Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add automatic retries and list interface #15

Merged
merged 4 commits into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .cargo/config.toml

This file was deleted.

43 changes: 37 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
tags:
- "v*.*.*"
workflow_dispatch: # This adds the manual trigger option
jobs:
build:
strategy:
Expand All @@ -20,29 +21,59 @@ jobs:
target: aarch64-apple-darwin
extension: ""
archive: tar.gz
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
extension: .exe
archive: tar.gz

runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build for Linux/macOS
if: "!endsWith(matrix.target, 'windows-msvc')"

- name: Install MinGW for Windows cross-compilation
if: matrix.target == 'x86_64-pc-windows-gnu'
run: |
sudo apt-get update
sudo apt-get install -y mingw-w64

- name: Download NPCAP SDK
if: contains(matrix.target, 'windows')
run: |
wget https://npcap.com/dist/npcap-sdk-1.13.zip -O /tmp/sdk.zip
unzip /tmp/sdk.zip -d /tmp/sdk
mkdir -p /tmp/sdk/lib/x64
mkdir -p /tmp/sdk86/lib
mkdir -p /tmp/sdkarm/lib
cp /tmp/sdk/Lib/x64/*lib /tmp/sdk/lib/x64
cp /tmp/sdk/Lib/x64/*lib /tmp/sdk/lib
cp /tmp/sdk/Lib/*lib /tmp/sdk86/lib
cp -r /tmp/sdk/Include /tmp/sdk86
cp /tmp/sdk/Lib/ARM64/*lib /tmp/sdkarm/lib
cp -r /tmp/sdk/Include /tmp/sdkarm

- name: Build for Linux/macOS/Windows
run: |
cargo build --release --target ${{ matrix.target }}
mkdir -p release/yapppwn-${{ matrix.target }}
cp target/${{ matrix.target }}/release/yapppwn${{ matrix.extension }} release/yapppwn-${{ matrix.target }}/yapppwn
chmod +x release/yapppwn-${{ matrix.target }}/yapppwn
cp target/${{ matrix.target }}/release/yapppwn${{ matrix.extension }} release/yapppwn-${{ matrix.target }}/yapppwn${{ matrix.extension }}

- name: Package artifact
run: |
cd release
tar -czf yapppwn-${{ matrix.target }}.${{ matrix.archive }} yapppwn-${{ matrix.target }}/yapppwn
tar -czf yapppwn-${{ matrix.target }}.${{ matrix.archive }} yapppwn-${{ matrix.target }}/yapppwn${{ matrix.extension }}

- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: yapppwn-${{ matrix.target }}.${{ matrix.archive }}
path: release/yapppwn-${{ matrix.target }}.${{ matrix.archive }}

create_release:
needs: build
runs-on: ubuntu-latest
Expand Down
Loading