build(deps): bump actions/upload-artifact from 3 to 4 #1302
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_call: | |
secrets: | |
NPCAP_OEM_URL: | |
required: true | |
env: | |
CARGO_TERM_COLOR: always | |
# Linters inspired from here: https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
jobs: | |
macOS: | |
name: MacOS (fmt, build, clippy, test) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: build | |
run: cargo build --verbose | |
- name: clippy | |
run: cargo clippy -- -D warnings | |
- name: test | |
run: cargo test --verbose | |
Linux: | |
name: Linux (fmt, build, clippy, test) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Install libpcap | |
run: sudo apt-get install libpcap-dev | |
- name: Install dependency for alsa-sys | |
run: sudo apt-get install libasound2-dev | |
- name: Install dependency for rfd | |
run: sudo apt-get install libgtk-3-dev | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: build | |
run: cargo build --verbose | |
- name: clippy | |
run: cargo clippy -- -D warnings | |
- name: test | |
run: cargo test --verbose | |
Windows: | |
name: Windows (fmt, build, clippy, test) | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Install npcap sdk | |
run: | | |
Invoke-WebRequest -Uri "https://npcap.com/dist/npcap-sdk-1.13.zip" -OutFile "C:/npcap-sdk.zip" | |
Expand-Archive -LiteralPath C:/npcap-sdk.zip -DestinationPath C:/npcap-sdk | |
echo "LIB=C:/npcap-sdk/Lib/x64" >> $env:GITHUB_ENV | |
- name: Install npcap dll | |
# Secrets are not passed to workflows that are triggered by a pull request from a fork. | |
# https://docs.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets | |
if: github.event_name != 'pull_request' | |
run: | | |
Invoke-WebRequest -Uri ${{secrets.NPCAP_OEM_URL}} -OutFile C:/npcap-oem.exe | |
C:/npcap-oem.exe /S | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: build | |
if: github.event_name != 'pull_request' | |
run: cargo build --verbose | |
- name: clippy | |
if: github.event_name != 'pull_request' | |
run: cargo clippy -- -D warnings | |
- name: test | |
if: github.event_name != 'pull_request' | |
run: cargo test --verbose |