build(deps): bump actions/upload-artifact from 3 to 4 #1304
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: | |
rust: | |
name: ${{ matrix.target }} | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- os: ubuntu | |
target: i686-unknown-linux-gnu | |
- os: ubuntu | |
target: armv7-unknown-linux-gnueabihf | |
- os: ubuntu | |
target: x86_64-unknown-linux-gnu | |
- os: ubuntu | |
target: aarch64-unknown-linux-gnu | |
- os: macos | |
target: x86_64-apple-darwin | |
- os: macos | |
target: aarch64-apple-darwin | |
- os: windows | |
target: i686-pc-windows-msvc | |
- os: windows | |
target: x86_64-pc-windows-msvc | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
targets: ${{ matrix.target }} | |
- name: Install Linux dependencies | |
if: matrix.os == 'ubuntu' | |
run: sudo apt-get install libpcap-dev libasound2-dev libgtk-3-dev | |
- name: Install Windows dependencies | |
if: matrix.os == 'windows' && github.event_name != 'pull_request' | |
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 | |
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: matrix.os != 'windows' || github.event_name != 'pull_request' | |
run: cargo build --verbose --target ${{ matrix.target }} | |
- name: clippy | |
if: matrix.os != 'windows' || github.event_name != 'pull_request' | |
run: cargo clippy -- -D warnings --target ${{ matrix.target }} | |
- name: test | |
if: matrix.os != 'windows' || github.event_name != 'pull_request' | |
run: cargo test --verbose --target ${{ matrix.target }} |