From d23e4e494f7446e21184bf58acd17a861ae73bba Mon Sep 17 00:00:00 2001 From: Delta 4 <156182500+delta4chat@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:54:41 +0800 Subject: [PATCH] CI: add test for netbsd --- .github/workflows/rust.yml | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cecfae37a..e9af88327 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,11 +26,40 @@ jobs: pkg install -y curl curl https://sh.rustup.rs -sSf --output rustup.sh sh rustup.sh -y --profile minimal --default-toolchain stable - echo "~~~~ rustc --version ~~~~" - $HOME/.cargo/bin/rustc --version - echo "~~~~ freebsd-version ~~~~" + run: | + export PATH="$HOME/.cargo/bin:$PATH" + echo "===== rustc --version =====" + rustc --version + echo "===== freebsd-version =====" freebsd-version - run: $HOME/.cargo/bin/cargo build --all-targets && $HOME/.cargo/bin/cargo test && $HOME/.cargo/bin/cargo test --manifest-path fuzz/Cargo.toml && $HOME/.cargo/bin/cargo test -p quinn-udp --benches + + cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches + + test-netbsd: + name: test on netbsd + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: test on netbsd + uses: vmactions/netbsd-vm@v1 + with: + usesh: true + mem: 4096 + copyback: false + prepare: | + export PATH="/usr/sbin:/sbin:$PATH" + pkg_add curl + curl https://sh.rustup.rs -sSf --output rustup.sh + sh rustup.sh -y --profile minimal --default-toolchain stable + run: | + export PATH="$HOME/.cargo/bin:$PATH" + echo "===== rustc --version =====" + rustc --version + echo "===== uname -a =====" + uname -a + + cargo build --all-targets && cargo test && cargo test --manifest-path fuzz/Cargo.toml && cargo test -p quinn-udp --benches + test: strategy: matrix: