From 55853198d91d07a96fb3a5c52ae836c55f41a7ab Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 13:49:51 +0300 Subject: [PATCH 01/37] ci: Use `vmactions` for checks on other platforms WIP --- .github/workflows/check-vm.yml | 104 +++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 .github/workflows/check-vm.yml diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml new file mode 100644 index 0000000000..39d7936834 --- /dev/null +++ b/.github/workflows/check-vm.yml @@ -0,0 +1,104 @@ +name: CI VM +on: + push: + branches: ["main"] + paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] + pull_request: + branches: ["main"] + paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] + merge_group: + workflow_dispatch: +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + check-vm: + strategy: + fail-fast: false + matrix: + os: [freebsd, openbsd, netbsd, solaris] + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + + - if: matrix.os == 'freebsd' + uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d + with: + usesh: true + run: | + pkg install -y rust + pkg install -y nss + pkg install -y cmake + pkg install -y git + + - if: matrix.os == 'openbsd' + uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df + with: + usesh: true + run: | + pkg install -y rust + pkg install -y nss + pkg install -y cmake + pkg install -y git + + - if: matrix.os == 'netbsd' + uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 + with: + usesh: true + run: | + pkg install -y rust + pkg install -y nss + pkg install -y cmake + pkg install -y git + + - if: matrix.os == 'solaris' + uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 + with: + usesh: true + run: | + pkg install -y rust + pkg install -y nss + pkg install -y cmake + pkg install -y git + + # - uses: ./.github/actions/rust + # with: + # tools: cargo-nextest + # token: ${{ secrets.GITHUB_TOKEN }} + + # - id: nss-version + # run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT" + + # - uses: ./.github/actions/nss + # with: + # minimum-version: ${{ steps.nss-version.outputs.minimum }} + + # - run: cargo check --all-targets --features ci + # - run: RUST_LOG=trace cargo nextest run --features ci --no-fail-fast + + # - name: Run client/server transfer + # run: | + # cargo build --bin neqo-client --bin neqo-server + # "target/debug/neqo-server" "$HOST:4433" & + # PID=$! + # # Give the server time to start. + # sleep 1 + # "target/debug/neqo-client" --output-dir . "https://$HOST:4433/$SIZE" + # kill $PID + # [ "$(wc -c <"$SIZE")" -eq "$SIZE" ] || exit 1 + # env: + # HOST: localhost + # SIZE: 54321 + # RUST_LOG: warn From 769cf467efb740245336d9baba1caeecc0ccc38e Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 13:59:51 +0300 Subject: [PATCH 02/37] More --- .github/workflows/check-vm.yml | 44 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 39d7936834..f7bfcbf368 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -37,46 +37,45 @@ jobs: uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d with: usesh: true + prepare: | + pkg install -y rust nss run: | - pkg install -y rust - pkg install -y nss - pkg install -y cmake - pkg install -y git + echo "Hello, ${{ matrix.os}}!" + cargo check --all-targets --features ci + RUST_LOG=trace cargo test --features ci --no-fail-fast - if: matrix.os == 'openbsd' uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df with: usesh: true + prepare: | + pkg_add -y rust nss run: | - pkg install -y rust - pkg install -y nss - pkg install -y cmake - pkg install -y git + echo "Hello, ${{ matrix.os}}!" + cargo check --all-targets --features ci + RUST_LOG=trace cargo test --features ci --no-fail-fast - if: matrix.os == 'netbsd' uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 with: usesh: true + prepare: | + pkg_add -y rust nss run: | - pkg install -y rust - pkg install -y nss - pkg install -y cmake - pkg install -y git + echo "Hello, ${{ matrix.os}}!" + cargo check --all-targets --features ci + RUST_LOG=trace cargo test --features ci --no-fail-fast - if: matrix.os == 'solaris' uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 with: usesh: true + prepare: | + pkg install -y rust nss run: | - pkg install -y rust - pkg install -y nss - pkg install -y cmake - pkg install -y git - - # - uses: ./.github/actions/rust - # with: - # tools: cargo-nextest - # token: ${{ secrets.GITHUB_TOKEN }} + echo "Hello, ${{ matrix.os}}!" + cargo check --all-targets --features ci + RUST_LOG=trace cargo test --features ci --no-fail-fast # - id: nss-version # run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT" @@ -85,9 +84,6 @@ jobs: # with: # minimum-version: ${{ steps.nss-version.outputs.minimum }} - # - run: cargo check --all-targets --features ci - # - run: RUST_LOG=trace cargo nextest run --features ci --no-fail-fast - # - name: Run client/server transfer # run: | # cargo build --bin neqo-client --bin neqo-server From 08b76414119a1559edccb7ee72af4f908f441b08 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 14:05:32 +0300 Subject: [PATCH 03/37] More --- .github/workflows/check-vm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index f7bfcbf368..ef10032269 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -38,7 +38,7 @@ jobs: with: usesh: true prepare: | - pkg install -y rust nss + pkg install -y rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -49,7 +49,7 @@ jobs: with: usesh: true prepare: | - pkg_add -y rust nss + pkg_add rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -60,7 +60,7 @@ jobs: with: usesh: true prepare: | - pkg_add -y rust nss + pkg_add rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -71,7 +71,7 @@ jobs: with: usesh: true prepare: | - pkg install -y rust nss + pkg install rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci From e406876fb2a1fa452d2b938ce7bc9f0e5c3c5315 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 14:13:59 +0300 Subject: [PATCH 04/37] More --- .github/workflows/check-vm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index ef10032269..fa9fe37202 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -38,7 +38,7 @@ jobs: with: usesh: true prepare: | - pkg install -y rust nss pkg-config + pkg install -y rust nss pkgconf run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -49,7 +49,7 @@ jobs: with: usesh: true prepare: | - pkg_add rust nss pkg-config + pkg_add rust nss pkgconf run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -60,7 +60,7 @@ jobs: with: usesh: true prepare: | - pkg_add rust nss pkg-config + /usr/sbin/pkg_add rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -71,7 +71,7 @@ jobs: with: usesh: true prepare: | - pkg install rust nss pkg-config + pkgutil -y -i rust nss pkg-config run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci From fb6e0ec6bb4b944022051a4196c1567e60d76b31 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 14:26:53 +0300 Subject: [PATCH 05/37] NSS --- .github/workflows/check-vm.yml | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index fa9fe37202..5c446dbb0e 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -26,19 +26,24 @@ jobs: matrix: os: [freebsd, openbsd, netbsd, solaris] runs-on: ubuntu-latest - defaults: - run: - shell: bash + env: + NSS_DIR: ${{ github.workspace }}/nss steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + # Force a download of the latest NSS sources. + - uses: ./.github/actions/nss + with: + minimum-version: 999.999 + - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d with: usesh: true + envs: NSS_DIR prepare: | - pkg install -y rust nss pkgconf + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -48,8 +53,9 @@ jobs: uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df with: usesh: true + envs: NSS_DIR prepare: | - pkg_add rust nss pkgconf + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -59,8 +65,9 @@ jobs: uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 with: usesh: true + envs: NSS_DIR prepare: | - /usr/sbin/pkg_add rust nss pkg-config + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -70,20 +77,14 @@ jobs: uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 with: usesh: true + envs: NSS_DIR prepare: | - pkgutil -y -i rust nss pkg-config + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast - # - id: nss-version - # run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT" - - # - uses: ./.github/actions/nss - # with: - # minimum-version: ${{ steps.nss-version.outputs.minimum }} - # - name: Run client/server transfer # run: | # cargo build --bin neqo-client --bin neqo-server From e1f06ac1dc263a054e66c81d1d62e89067f9726d Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 14:41:00 +0300 Subject: [PATCH 06/37] More NSS --- .github/workflows/check-vm.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 5c446dbb0e..bc7e98247d 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -31,19 +31,24 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - # Force a download of the latest NSS sources. - - uses: ./.github/actions/nss + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + repository: nss-dev/nss + path: nss + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: - minimum-version: 999.999 + repository: nss-dev/nspr + path: nspr - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d with: usesh: true + copyback: false envs: NSS_DIR prepare: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg install -y rust + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -53,9 +58,11 @@ jobs: uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df with: usesh: true + copyback: false envs: NSS_DIR prepare: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg_add rust + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -65,9 +72,11 @@ jobs: uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 with: usesh: true + copyback: false envs: NSS_DIR prepare: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + /usr/sbin/pkg_add rust + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" cargo check --all-targets --features ci @@ -77,8 +86,10 @@ jobs: uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 with: usesh: true + copyback: false envs: NSS_DIR prepare: | + pkg install –-accept curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" From 2f557c892b165b16026dca3f1a797dd26b7ab73e Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 14:49:30 +0300 Subject: [PATCH 07/37] More NSS --- .github/workflows/check-vm.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index bc7e98247d..bf552fb800 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -26,8 +26,6 @@ jobs: matrix: os: [freebsd, openbsd, netbsd, solaris] runs-on: ubuntu-latest - env: - NSS_DIR: ${{ github.workspace }}/nss steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -45,12 +43,13 @@ jobs: with: usesh: true copyback: false - envs: NSS_DIR prepare: | pkg install -y rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" + env | sort + export NSS_DIR=$(pwd)/nss cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -59,12 +58,13 @@ jobs: with: usesh: true copyback: false - envs: NSS_DIR prepare: | pkg_add rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" + env | sort + export NSS_DIR=$(pwd)/nss cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -73,12 +73,13 @@ jobs: with: usesh: true copyback: false - envs: NSS_DIR prepare: | /usr/sbin/pkg_add rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" + env | sort + export NSS_DIR=$(pwd)/nss cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -87,12 +88,13 @@ jobs: with: usesh: true copyback: false - envs: NSS_DIR prepare: | - pkg install –-accept curl + pkg install curl curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | echo "Hello, ${{ matrix.os}}!" + env | sort + export NSS_DIR=$(pwd)/nss cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From 74edfb6c0679911c49b7c6595d165fab507173b6 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:00:24 +0300 Subject: [PATCH 08/37] More NSS --- .github/workflows/check-vm.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index bf552fb800..ccd6e2b22e 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -47,9 +47,8 @@ jobs: pkg install -y rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | - echo "Hello, ${{ matrix.os}}!" - env | sort export NSS_DIR=$(pwd)/nss + export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -62,9 +61,8 @@ jobs: pkg_add rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | - echo "Hello, ${{ matrix.os}}!" - env | sort export NSS_DIR=$(pwd)/nss + export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -77,9 +75,8 @@ jobs: /usr/sbin/pkg_add rust # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | - echo "Hello, ${{ matrix.os}}!" - env | sort export NSS_DIR=$(pwd)/nss + export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -89,12 +86,11 @@ jobs: usesh: true copyback: false prepare: | - pkg install curl - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg install rust + # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | - echo "Hello, ${{ matrix.os}}!" - env | sort export NSS_DIR=$(pwd)/nss + export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From d4c574d8f862ecd7545b17d3ffe4777c7f82af36 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:14:54 +0300 Subject: [PATCH 09/37] bash --- .github/workflows/check-vm.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index ccd6e2b22e..6664ae7a73 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -49,6 +49,8 @@ jobs: run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug + export BASH=$(which sh) + env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -63,6 +65,8 @@ jobs: run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug + export BASH=$(which sh) + env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -77,6 +81,8 @@ jobs: run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug + export BASH=$(which sh) + env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -91,6 +97,8 @@ jobs: run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug + export BASH=$(which sh) + env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From f3942fe5ce786e172b84ae778509c71f485f0892 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:21:04 +0300 Subject: [PATCH 10/37] More bash --- .github/workflows/check-vm.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 6664ae7a73..dd939521c5 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -44,12 +44,11 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y rust + pkg install -y rust bash # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - export BASH=$(which sh) env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -60,12 +59,11 @@ jobs: usesh: true copyback: false prepare: | - pkg_add rust + pkg_add rust bash # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - export BASH=$(which sh) env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -76,12 +74,11 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add rust + /usr/sbin/pkg_add rust bash # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - export BASH=$(which sh) env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -92,12 +89,11 @@ jobs: usesh: true copyback: false prepare: | - pkg install rust + pkg install rust bash # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - export BASH=$(which sh) env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From 70b419e9450c2a8307ae720366bb3e0e7e55989c Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:30:52 +0300 Subject: [PATCH 11/37] More --- .github/workflows/check-vm.yml | 39 +++++++++++----------------------- 1 file changed, 12 insertions(+), 27 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index dd939521c5..1695645051 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -44,12 +44,12 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y rust bash - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg install -y bash ninja python gyp + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -59,12 +59,12 @@ jobs: usesh: true copyback: false prepare: | - pkg_add rust bash - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg_add bash ninja python gyp + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -74,12 +74,12 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add rust bash - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + /usr/sbin/pkg_add bash ninja python gyp + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -89,26 +89,11 @@ jobs: usesh: true copyback: false prepare: | - pkg install rust bash - # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + pkg install bash ninja python gyp + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ + sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug - env | sort cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast - - # - name: Run client/server transfer - # run: | - # cargo build --bin neqo-client --bin neqo-server - # "target/debug/neqo-server" "$HOST:4433" & - # PID=$! - # # Give the server time to start. - # sleep 1 - # "target/debug/neqo-client" --output-dir . "https://$HOST:4433/$SIZE" - # kill $PID - # [ "$(wc -c <"$SIZE")" -eq "$SIZE" ] || exit 1 - # env: - # HOST: localhost - # SIZE: 54321 - # RUST_LOG: warn From da94f0d1197b293a520cbd4b505ec7322f7d7cae Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:36:21 +0300 Subject: [PATCH 12/37] Solaris release --- .github/workflows/check-vm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 1695645051..2fa903783a 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -86,6 +86,7 @@ jobs: - if: matrix.os == 'solaris' uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 with: + release: "11.4-gcc" usesh: true copyback: false prepare: | From e3ec66a44716db8f17453a8fb842c84f3b8cc4cc Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:44:10 +0300 Subject: [PATCH 13/37] More --- .github/workflows/check-vm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 2fa903783a..368878fbfb 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -44,7 +44,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y bash ninja python gyp + pkg install -y curl bash ninja python gyp-next curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -59,7 +59,7 @@ jobs: usesh: true copyback: false prepare: | - pkg_add bash ninja python gyp + pkg_add curl bash ninja python-3.10.14 gyp curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -74,7 +74,7 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add bash ninja python gyp + /usr/sbin/pkg_add curl bash ninja python3 gyp-next curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -90,7 +90,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install bash ninja python gyp + pkg install curl bash ninja python3 gyp-next curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | From 0e144a78aa48ab1a809cb64da27ee12f1ca15b92 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 15:54:28 +0300 Subject: [PATCH 14/37] python --- .github/workflows/check-vm.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 368878fbfb..2e0f34a9dc 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -8,9 +8,6 @@ on: paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: workflow_dispatch: -env: - CARGO_TERM_COLOR: always - RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -44,7 +41,9 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y curl bash ninja python gyp-next + pkg install -y curl bash ninja python3 + echo "gyp-next>=0.18.1" > req.txt + python3 -m pip install -r req.txt curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -59,7 +58,9 @@ jobs: usesh: true copyback: false prepare: | - pkg_add curl bash ninja python-3.10.14 gyp + pkg_add curl bash ninja python-3.10.14 + echo "gyp-next>=0.18.1" > req.txt + python3 -m pip install -r req.txt curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -74,7 +75,9 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add curl bash ninja python3 gyp-next + /usr/sbin/pkg_add curl bash ninja python312 + echo "gyp-next>=0.18.1" > req.txt + python3 -m pip install -r req.txt curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | @@ -90,7 +93,9 @@ jobs: usesh: true copyback: false prepare: | - pkg install curl bash ninja python3 gyp-next + pkg install curl bash ninja python3 + echo "gyp-next>=0.18.1" > req.txt + python3 -m pip install -r req.txt curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ sh -s -- --profile minimal --default-toolchain stable run: | From 491c5b8e88a4b746b9c96befcf7c7f6ca5867ab1 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 16:14:37 +0300 Subject: [PATCH 15/37] Again --- .github/workflows/check-vm.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 2e0f34a9dc..0f21ed91a5 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -41,11 +41,9 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y curl bash ninja python3 + pkg install -y curl rust bash ninja python3 py-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -58,11 +56,9 @@ jobs: usesh: true copyback: false prepare: | - pkg_add curl bash ninja python-3.10.14 + pkg_add curl rust bash ninja python-3.10.14 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -75,11 +71,9 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add curl bash ninja python312 + /usr/sbin/pkg_add curl rust bash ninja python312 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -93,11 +87,10 @@ jobs: usesh: true copyback: false prepare: | - pkg install curl bash ninja python3 + pkg install curl rust bash ninja python3 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ - sh -s -- --profile minimal --default-toolchain stable + curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug From 4b8441afe1cdb73fb19d2c8f69933b2819fbd7ea Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 16:43:55 +0300 Subject: [PATCH 16/37] Again --- .github/workflows/check-vm.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 0f21ed91a5..1ff66df42c 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -41,7 +41,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y curl rust bash ninja python3 py-pip + pkg install -y -v rust bash ninja python310 py310-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | @@ -56,7 +56,7 @@ jobs: usesh: true copyback: false prepare: | - pkg_add curl rust bash ninja python-3.10.14 + pkg_add -v rust bash ninja python-3.10 py3-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | @@ -71,7 +71,7 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add curl rust bash ninja python312 + /usr/sbin/pkg_add -v rust bash ninja python312 py312-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | @@ -87,10 +87,9 @@ jobs: usesh: true copyback: false prepare: | - pkg install curl rust bash ninja python3 + pkg install -v cargo bash ninja python-39 pip-39 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt - curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug From aa183c04672ed4024bc71ea63789aa7add173db5 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 16:51:58 +0300 Subject: [PATCH 17/37] Again --- .github/workflows/check-vm.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 1ff66df42c..302bcfec8a 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -41,7 +41,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y -v rust bash ninja python310 py310-pip + pkg install -y rust bash ninja python310 py310-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | @@ -56,7 +56,7 @@ jobs: usesh: true copyback: false prepare: | - pkg_add -v rust bash ninja python-3.10 py3-pip + pkg_add rust bash ninja py3-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | @@ -71,9 +71,9 @@ jobs: usesh: true copyback: false prepare: | - /usr/sbin/pkg_add -v rust bash ninja python312 py312-pip + /usr/sbin/pkg_add rust bash ninja python312 py312-pip echo "gyp-next>=0.18.1" > req.txt - python3 -m pip install -r req.txt + python3.12 -m pip install -r req.txt run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -87,7 +87,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install -v cargo bash ninja python-39 pip-39 + pkg install cargo bash ninja python-39 pip-39 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt run: | From 3e60161eb9cf1d948cbbdf83af30268805d34241 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 17:00:54 +0300 Subject: [PATCH 18/37] Again --- .github/workflows/check-vm.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 302bcfec8a..967671d9ee 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -41,9 +41,10 @@ jobs: usesh: true copyback: false prepare: | - pkg install -y rust bash ninja python310 py310-pip + pkg install -y rust bash ninja python311 py311-pip echo "gyp-next>=0.18.1" > req.txt - python3 -m pip install -r req.txt + python3.11 -m pip install -r req.txt + cd /bin && ln -s python3.11 python run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -59,6 +60,7 @@ jobs: pkg_add rust bash ninja py3-pip echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt + cd /bin && ln -s python3 python run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -74,6 +76,7 @@ jobs: /usr/sbin/pkg_add rust bash ninja python312 py312-pip echo "gyp-next>=0.18.1" > req.txt python3.12 -m pip install -r req.txt + cd /bin && ln -s python3.12 python run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug @@ -90,6 +93,7 @@ jobs: pkg install cargo bash ninja python-39 pip-39 echo "gyp-next>=0.18.1" > req.txt python3 -m pip install -r req.txt + cd /bin && ln -s python3 python run: | export NSS_DIR=$(pwd)/nss export NSS_TARGET=Debug From f218618719227d9e439840e15c4b4c1a0f6f048b Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 17:08:46 +0300 Subject: [PATCH 19/37] Again --- .github/workflows/check-vm.yml | 36 +++++++++++++++------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 967671d9ee..ed35226dd1 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -23,6 +23,9 @@ jobs: matrix: os: [freebsd, openbsd, netbsd, solaris] runs-on: ubuntu-latest + env: + NSS_DIR: ${{ github.workspace }}/nss + NSS_TARGET: Debug steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -34,20 +37,19 @@ jobs: with: repository: nss-dev/nspr path: nspr + - run: echo "gyp-next>=0.18.1" > req.txt - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d with: usesh: true + envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | pkg install -y rust bash ninja python311 py311-pip - echo "gyp-next>=0.18.1" > req.txt - python3.11 -m pip install -r req.txt - cd /bin && ln -s python3.11 python + cd /bin && ln -s $(which python3.11) python + python -m pip install -r req.txt run: | - export NSS_DIR=$(pwd)/nss - export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -55,15 +57,13 @@ jobs: uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df with: usesh: true + envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | pkg_add rust bash ninja py3-pip - echo "gyp-next>=0.18.1" > req.txt - python3 -m pip install -r req.txt - cd /bin && ln -s python3 python + cd /bin && ln -s $(which python3) python + python -m pip install -r req.txt run: | - export NSS_DIR=$(pwd)/nss - export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -71,15 +71,13 @@ jobs: uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 with: usesh: true + envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | /usr/sbin/pkg_add rust bash ninja python312 py312-pip - echo "gyp-next>=0.18.1" > req.txt - python3.12 -m pip install -r req.txt - cd /bin && ln -s python3.12 python + cd /bin && ln -s $(which python3.12) python + python -m pip install -r req.txt run: | - export NSS_DIR=$(pwd)/nss - export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -88,14 +86,12 @@ jobs: with: release: "11.4-gcc" usesh: true + envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | pkg install cargo bash ninja python-39 pip-39 - echo "gyp-next>=0.18.1" > req.txt - python3 -m pip install -r req.txt - cd /bin && ln -s python3 python + cd /bin && ln -s $(which python3) python + python -m pip install -r req.txt run: | - export NSS_DIR=$(pwd)/nss - export NSS_TARGET=Debug cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From 64cffbb2c30aff2461792da0c5dcc9bc030f5538 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 17:15:28 +0300 Subject: [PATCH 20/37] --break-system-packages --- .github/workflows/check-vm.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index ed35226dd1..d59ee95593 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -37,7 +37,6 @@ jobs: with: repository: nss-dev/nspr path: nspr - - run: echo "gyp-next>=0.18.1" > req.txt - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d @@ -48,7 +47,8 @@ jobs: prepare: | pkg install -y rust bash ninja python311 py311-pip cd /bin && ln -s $(which python3.11) python - python -m pip install -r req.txt + echo "gyp-next>=0.18.1" > req.txt + python -m pip install -r req.txt --break-system-packages run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -62,7 +62,8 @@ jobs: prepare: | pkg_add rust bash ninja py3-pip cd /bin && ln -s $(which python3) python - python -m pip install -r req.txt + echo "gyp-next>=0.18.1" > req.txt + python -m pip install -r req.txt --break-system-packages run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -76,7 +77,8 @@ jobs: prepare: | /usr/sbin/pkg_add rust bash ninja python312 py312-pip cd /bin && ln -s $(which python3.12) python - python -m pip install -r req.txt + echo "gyp-next>=0.18.1" > req.txt + python -m pip install -r req.txt --break-system-packages run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -90,8 +92,9 @@ jobs: copyback: false prepare: | pkg install cargo bash ninja python-39 pip-39 - cd /bin && ln -s $(which python3) python - python -m pip install -r req.txt + # cd /bin && ln -s $(which python3) python + echo "gyp-next>=0.18.1" > req.txt + python -m pip install -r req.txt --break-system-packages run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From 7d6be83a79be973213e2f1aba037afadfc0c46a1 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Tue, 24 Sep 2024 17:23:07 +0300 Subject: [PATCH 21/37] gmake --- .github/workflows/check-vm.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index d59ee95593..0e6e44d43b 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -45,7 +45,7 @@ jobs: envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg install -y rust bash ninja python311 py311-pip + pkg install -y rust bash gmake ninja python311 py311-pip cd /bin && ln -s $(which python3.11) python echo "gyp-next>=0.18.1" > req.txt python -m pip install -r req.txt --break-system-packages @@ -60,7 +60,7 @@ jobs: envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg_add rust bash ninja py3-pip + pkg_add rust bash gmake ninja py3-pip cd /bin && ln -s $(which python3) python echo "gyp-next>=0.18.1" > req.txt python -m pip install -r req.txt --break-system-packages @@ -75,7 +75,7 @@ jobs: envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - /usr/sbin/pkg_add rust bash ninja python312 py312-pip + /usr/sbin/pkg_add rust bash gmake ninja python312 py312-pip cd /bin && ln -s $(which python3.12) python echo "gyp-next>=0.18.1" > req.txt python -m pip install -r req.txt --break-system-packages @@ -91,10 +91,10 @@ jobs: envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg install cargo bash ninja python-39 pip-39 + pkg install cargo bash gmake ninja python-39 pip-39 # cd /bin && ln -s $(which python3) python echo "gyp-next>=0.18.1" > req.txt - python -m pip install -r req.txt --break-system-packages + python -m pip install -r req.txt run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From a9f89bdae3f35dadce30765c6a947f48f4ad41f2 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 25 Sep 2024 09:51:01 +0300 Subject: [PATCH 22/37] NSS from packages --- .github/workflows/check-vm.yml | 38 +++++++--------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 0e6e44d43b..9d8f917a52 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -23,32 +23,20 @@ jobs: matrix: os: [freebsd, openbsd, netbsd, solaris] runs-on: ubuntu-latest - env: - NSS_DIR: ${{ github.workspace }}/nss - NSS_TARGET: Debug steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - repository: nss-dev/nss - path: nss - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - with: - repository: nss-dev/nspr - path: nspr - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d with: usesh: true - envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg install -y rust bash gmake ninja python311 py311-pip - cd /bin && ln -s $(which python3.11) python - echo "gyp-next>=0.18.1" > req.txt - python -m pip install -r req.txt --break-system-packages + mkdir -p /usr/local/etc/pkg/repos + sed 's/quarterly/latest/' /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf + pkg update + pkg install -y rust nss pkgconf run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -57,13 +45,9 @@ jobs: uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df with: usesh: true - envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg_add rust bash gmake ninja py3-pip - cd /bin && ln -s $(which python3) python - echo "gyp-next>=0.18.1" > req.txt - python -m pip install -r req.txt --break-system-packages + pkg_add rust nss pkgconf run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -72,13 +56,9 @@ jobs: uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 with: usesh: true - envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - /usr/sbin/pkg_add rust bash gmake ninja python312 py312-pip - cd /bin && ln -s $(which python3.12) python - echo "gyp-next>=0.18.1" > req.txt - python -m pip install -r req.txt --break-system-packages + pkgin install rust nss pkgconf run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -88,13 +68,9 @@ jobs: with: release: "11.4-gcc" usesh: true - envs: 'NSS_DIR NSS_TARGET' copyback: false prepare: | - pkg install cargo bash gmake ninja python-39 pip-39 - # cd /bin && ln -s $(which python3) python - echo "gyp-next>=0.18.1" > req.txt - python -m pip install -r req.txt + pkg install cargo nss pkgconf run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From b2f3229102d7144c092b8d60ffcae363f18f2de8 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Wed, 25 Sep 2024 09:55:51 +0300 Subject: [PATCH 23/37] More --- .github/workflows/check-vm.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 9d8f917a52..aed55497e2 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -58,7 +58,7 @@ jobs: usesh: true copyback: false prepare: | - pkgin install rust nss pkgconf + /usr/sbin/pkg_add rust nss pkgconf run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast @@ -70,7 +70,7 @@ jobs: usesh: true copyback: false prepare: | - pkg install cargo nss pkgconf + pkg install cargo nss pkg-config run: | cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast From 92055ee8b1328b87ac21411ac50bc9e3fb9a9962 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Thu, 3 Oct 2024 15:00:00 +0300 Subject: [PATCH 24/37] Don't even try solaris --- .github/workflows/check-vm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index aed55497e2..07d7b2a8cc 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - os: [freebsd, openbsd, netbsd, solaris] + os: [freebsd, openbsd, netbsd] # solaris has a super-old rust package runs-on: ubuntu-latest steps: From 207c59cdd3d538e2e6ea657e9d2b30c6b83bbbed Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 15 Nov 2024 17:45:08 +0200 Subject: [PATCH 25/37] From `mtu` --- .github/workflows/check-vm.yml | 75 ++++++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 21 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 07d7b2a8cc..e29a1e04fc 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -8,6 +8,9 @@ on: paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: workflow_dispatch: +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -25,52 +28,82 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - if: matrix.os == 'freebsd' - uses: vmactions/freebsd-vm@d7b8fcc7711aa41ad45e8d9b737cf90f035a7e3d + uses: vmactions/freebsd-vm@debf37ca7b7fa40e19c542ef7ba30d6054a706a4 with: usesh: true - copyback: false + envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | - mkdir -p /usr/local/etc/pkg/repos - sed 's/quarterly/latest/' /etc/pkg/FreeBSD.conf > /usr/local/etc/pkg/repos/FreeBSD.conf - pkg update - pkg install -y rust nss pkgconf + pkg install -y curl llvm run: | - cargo check --all-targets --features ci - RUST_LOG=trace cargo test --features ci --no-fail-fast + sh rustup.sh --default-toolchain stable --component llvm-tools -y + . "$HOME/.cargo/env" + export RUST_LOG=trace + cargo install cargo-llvm-cov --locked + cargo check --all-targets + cargo clippy + cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info + cargo test --no-fail-fast --release - if: matrix.os == 'openbsd' - uses: vmactions/openbsd-vm@ebafa4eac4adf5e7d04e5bbb4aa764b75dd160df + uses: vmactions/openbsd-vm@0cfe06e734a0ea3a546fca7ebf200b984b94d58a with: usesh: true - copyback: false + envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | - pkg_add rust nss pkgconf + pkg_add rust llvm-16.0.6p30 # rustup doesn't support OpenBSD at all run: | - cargo check --all-targets --features ci - RUST_LOG=trace cargo test --features ci --no-fail-fast + export LIBCLANG_PATH=/usr/local/llvm16/lib + export RUST_LOG=trace + cargo check --all-targets + cargo clippy + cargo test --no-fail-fast + cargo test --no-fail-fast --release - if: matrix.os == 'netbsd' - uses: vmactions/netbsd-vm@dd0161ecbb6386e562fd098acf367633501487a4 + uses: vmactions/netbsd-vm@7c9086fdb4cc1aa814cda6e305390c2b966551a9 with: usesh: true - copyback: false + envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | - /usr/sbin/pkg_add rust nss pkgconf + /usr/sbin/pkg_add pkgin + pkgin -y install curl clang run: | - cargo check --all-targets --features ci - RUST_LOG=trace cargo test --features ci --no-fail-fast + sh rustup.sh --default-toolchain stable --component llvm-tools -y + . "$HOME/.cargo/env" + export LIBCLANG_PATH=/usr/pkg/lib + export RUST_LOG=trace + cargo install cargo-llvm-cov --locked + cargo check --all-targets + cargo clippy + cargo test --no-fail-fast + # FIXME: error[E0463]: can't find crate for `profiler_builtins`, + # so don't fail the workflow when that happens. + cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info || true + cargo test --no-fail-fast --release - if: matrix.os == 'solaris' - uses: vmactions/solaris-vm@960d7483ffd6ac03397964cf6423a2f41332c9c8 + uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 with: release: "11.4-gcc" usesh: true - copyback: false + envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | pkg install cargo nss pkg-config run: | + sh rustup.sh --default-toolchain stable --component llvm-tools -y + . "$HOME/.cargo/env" + export RUST_LOG=trace cargo check --all-targets --features ci RUST_LOG=trace cargo test --features ci --no-fail-fast + + - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 + with: + file: lcov.info + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 13b82a80e1dd25e9c0e9657ed27ba9d6b02588aa Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 15 Nov 2024 17:49:15 +0200 Subject: [PATCH 26/37] rustup --- .github/workflows/check-vm.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index e29a1e04fc..0bf4196c44 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -29,6 +29,7 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - run: curl -o rustup.sh --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs - if: matrix.os == 'freebsd' uses: vmactions/freebsd-vm@debf37ca7b7fa40e19c542ef7ba30d6054a706a4 From 8c6d593d7b9fa41671612469fca89c8405e43df3 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 15 Nov 2024 17:57:25 +0200 Subject: [PATCH 27/37] nss & ci --- .github/workflows/check-vm.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 0bf4196c44..148782e54d 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -37,7 +37,7 @@ jobs: usesh: true envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | - pkg install -y curl llvm + pkg install -y curl llvm nss pkgconf run: | sh rustup.sh --default-toolchain stable --component llvm-tools -y . "$HOME/.cargo/env" @@ -45,8 +45,8 @@ jobs: cargo install cargo-llvm-cov --locked cargo check --all-targets cargo clippy - cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info - cargo test --no-fail-fast --release + cargo llvm-cov test --features ci --no-fail-fast --lcov --output-path lcov.info + cargo test --features ci --no-fail-fast --release - if: matrix.os == 'openbsd' uses: vmactions/openbsd-vm@0cfe06e734a0ea3a546fca7ebf200b984b94d58a @@ -54,14 +54,15 @@ jobs: usesh: true envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | - pkg_add rust llvm-16.0.6p30 # rustup doesn't support OpenBSD at all + pkg_add rust llvm-16.0.6p30 nss pkgconf # rustup doesn't support OpenBSD at all run: | export LIBCLANG_PATH=/usr/local/llvm16/lib export RUST_LOG=trace cargo check --all-targets cargo clippy - cargo test --no-fail-fast - cargo test --no-fail-fast --release + # FIXME: This should run llvm-cov, but it's not available on OpenBSD: + cargo test --features ci --no-fail-fast + cargo test --features ci --no-fail-fast --release - if: matrix.os == 'netbsd' uses: vmactions/netbsd-vm@7c9086fdb4cc1aa814cda6e305390c2b966551a9 @@ -70,7 +71,7 @@ jobs: envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" prepare: | /usr/sbin/pkg_add pkgin - pkgin -y install curl clang + pkgin -y install curl clang nss pkgconf run: | sh rustup.sh --default-toolchain stable --component llvm-tools -y . "$HOME/.cargo/env" @@ -79,11 +80,10 @@ jobs: cargo install cargo-llvm-cov --locked cargo check --all-targets cargo clippy - cargo test --no-fail-fast # FIXME: error[E0463]: can't find crate for `profiler_builtins`, # so don't fail the workflow when that happens. - cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info || true - cargo test --no-fail-fast --release + cargo llvm-cov test --features ci --no-fail-fast --lcov --output-path lcov.info || true + cargo test --features ci --no-fail-fast --release - if: matrix.os == 'solaris' uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 @@ -98,7 +98,9 @@ jobs: . "$HOME/.cargo/env" export RUST_LOG=trace cargo check --all-targets --features ci - RUST_LOG=trace cargo test --features ci --no-fail-fast + # FIXME: This should run llvm-cov: + cargo test --features ci --no-fail-fast + cargo test --features ci --no-fail-fast --release - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 with: From 771f1d8879547fad7e3cd52155e28dc9416fb4c9 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 15 Nov 2024 18:09:43 +0200 Subject: [PATCH 28/37] no trace --- .github/workflows/check-vm.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 148782e54d..a6b7734537 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -41,7 +41,7 @@ jobs: run: | sh rustup.sh --default-toolchain stable --component llvm-tools -y . "$HOME/.cargo/env" - export RUST_LOG=trace + # export RUST_LOG=trace cargo install cargo-llvm-cov --locked cargo check --all-targets cargo clippy @@ -57,10 +57,10 @@ jobs: pkg_add rust llvm-16.0.6p30 nss pkgconf # rustup doesn't support OpenBSD at all run: | export LIBCLANG_PATH=/usr/local/llvm16/lib - export RUST_LOG=trace + # export RUST_LOG=trace cargo check --all-targets - cargo clippy - # FIXME: This should run llvm-cov, but it's not available on OpenBSD: + # FIXME: unsupported: cargo clippy + # FIXME: Next line should run llvm-cov, but it's not available on OpenBSD: cargo test --features ci --no-fail-fast cargo test --features ci --no-fail-fast --release @@ -76,7 +76,7 @@ jobs: sh rustup.sh --default-toolchain stable --component llvm-tools -y . "$HOME/.cargo/env" export LIBCLANG_PATH=/usr/pkg/lib - export RUST_LOG=trace + # export RUST_LOG=trace cargo install cargo-llvm-cov --locked cargo check --all-targets cargo clippy @@ -96,7 +96,7 @@ jobs: run: | sh rustup.sh --default-toolchain stable --component llvm-tools -y . "$HOME/.cargo/env" - export RUST_LOG=trace + # export RUST_LOG=trace cargo check --all-targets --features ci # FIXME: This should run llvm-cov: cargo test --features ci --no-fail-fast From 5a4855d9027b2247963512a0128f6666d47f07e9 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 18 Nov 2024 08:25:45 +0200 Subject: [PATCH 29/37] Only test in CI on Linux --- neqo-common/src/hrtime.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/neqo-common/src/hrtime.rs b/neqo-common/src/hrtime.rs index 7187b7727d..85859bb5d2 100644 --- a/neqo-common/src/hrtime.rs +++ b/neqo-common/src/hrtime.rs @@ -370,11 +370,10 @@ impl Drop for Time { } } -// Only run these tests in CI on platforms other than MacOS and Windows, where the timer -// inaccuracies are too high to pass the tests. +// Only run these tests in CI on Linux, where the timer accuracies are OK enough to pass the tests. #[cfg(all( test, - not(all(any(target_os = "macos", target_os = "windows"), feature = "ci")), + not(all(not(target_os = "linux"), feature = "ci")), // Sanitizers are too slow to uphold timing assumptions. not(neqo_sanitize), ))] From b8b31c3dac0cf5abc500b1b5f6620dd4451a9119 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 2 Dec 2024 14:10:52 +0200 Subject: [PATCH 30/37] From mozilla/mtu --- .github/workflows/check-vm.yml | 111 +++++++++++++++++++-------------- 1 file changed, 64 insertions(+), 47 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index a6b7734537..1008118511 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -11,6 +11,7 @@ on: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 + RUST_LOG: trace concurrency: group: ${{ github.workflow }}-${{ github.ref_name }} @@ -24,7 +25,7 @@ jobs: strategy: fail-fast: false matrix: - os: [freebsd, openbsd, netbsd] # solaris has a super-old rust package + os: [freebsd, openbsd, netbsd, solaris] runs-on: ubuntu-latest steps: @@ -35,76 +36,92 @@ jobs: uses: vmactions/freebsd-vm@debf37ca7b7fa40e19c542ef7ba30d6054a706a4 with: usesh: true - envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" - prepare: | - pkg install -y curl llvm nss pkgconf - run: | - sh rustup.sh --default-toolchain stable --component llvm-tools -y + envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" + prepare: | # This executes as root + set -e + pkg install -y curl llvm + run: | # This executes as user + set -e + sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" - # export RUST_LOG=trace - cargo install cargo-llvm-cov --locked cargo check --all-targets - cargo clippy - cargo llvm-cov test --features ci --no-fail-fast --lcov --output-path lcov.info - cargo test --features ci --no-fail-fast --release + cargo clippy -- -D warnings + cargo install cargo-llvm-cov --locked + cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info + cargo test --no-fail-fast --release - if: matrix.os == 'openbsd' uses: vmactions/openbsd-vm@0cfe06e734a0ea3a546fca7ebf200b984b94d58a with: usesh: true - envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" - prepare: | - pkg_add rust llvm-16.0.6p30 nss pkgconf # rustup doesn't support OpenBSD at all - run: | + envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" + prepare: | # This executes as root + set -e + pkg_add rust rust-clippy llvm-16.0.6p30 # rustup doesn't support OpenBSD at all + run: | # This executes as user + set -e export LIBCLANG_PATH=/usr/local/llvm16/lib - # export RUST_LOG=trace cargo check --all-targets - # FIXME: unsupported: cargo clippy - # FIXME: Next line should run llvm-cov, but it's not available on OpenBSD: - cargo test --features ci --no-fail-fast - cargo test --features ci --no-fail-fast --release + cargo clippy -- -D warnings + # FIXME: No profiler support in openbsd currently, error is: + # > error[E0463]: can't find crate for `profiler_builtins` + # > = note: the compiler may have been built without the profiler runtime + # export LLVM_COV=/usr/local/llvm16/bin/llvm-cov + # export LLVM_PROFDATA=/usr/local/llvm16/bin/llvm-profdata + # cargo install cargo-llvm-cov --locked + # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info + cargo test --no-fail-fast # Remove this once profiler is supported + cargo test --no-fail-fast --release - if: matrix.os == 'netbsd' uses: vmactions/netbsd-vm@7c9086fdb4cc1aa814cda6e305390c2b966551a9 with: usesh: true - envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" - prepare: | + envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" + prepare: | # This executes as root + set -e /usr/sbin/pkg_add pkgin - pkgin -y install curl clang nss pkgconf - run: | - sh rustup.sh --default-toolchain stable --component llvm-tools -y + pkgin -y install curl clang + run: | # This executes as user + set -e + sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" - export LIBCLANG_PATH=/usr/pkg/lib - # export RUST_LOG=trace - cargo install cargo-llvm-cov --locked cargo check --all-targets - cargo clippy - # FIXME: error[E0463]: can't find crate for `profiler_builtins`, - # so don't fail the workflow when that happens. - cargo llvm-cov test --features ci --no-fail-fast --lcov --output-path lcov.info || true - cargo test --features ci --no-fail-fast --release + cargo clippy -- -D warnings + # FIXME: No profiler support in netbsd currently, error is: + # > error[E0463]: can't find crate for `profiler_builtins` + # > = note: the compiler may have been built without the profiler runtime + # cargo install cargo-llvm-cov --locked + # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info + cargo test --no-fail-fast # Remove this once profiler is supported + cargo test --no-fail-fast --release - if: matrix.os == 'solaris' - uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 + uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 with: release: "11.4-gcc" usesh: true - envs: "CARGO_TERM_COLOR RUST_BACKTRACE GITHUB_ACTIONS" - prepare: | - pkg install cargo nss pkg-config - run: | - sh rustup.sh --default-toolchain stable --component llvm-tools -y - . "$HOME/.cargo/env" - # export RUST_LOG=trace - cargo check --all-targets --features ci - # FIXME: This should run llvm-cov: - cargo test --features ci --no-fail-fast - cargo test --features ci --no-fail-fast --release + envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" + prepare: | # This executes as root + set -e + pkg install clang-libs + run: | # This executes as also as root on Solaris + set -e + source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install) || true # This doesn't exit with zero on success + export LIBCLANG_PATH="/usr/lib/amd64" + cargo check --all-targets + cargo clippy -- -D warnings + # FIXME: No profiler support in openbsd currently, error is: + # > error[E0463]: can't find crate for `profiler_builtins` + # > = note: the compiler may have been built without the profiler runtime + # cargo install cargo-llvm-cov --locked + # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info + cargo test --no-fail-fast # Remove this once profiler is supported + cargo test --no-fail-fast --release - - uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 + - uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 with: - file: lcov.info + files: lcov.info fail_ci_if_error: false token: ${{ secrets.CODECOV_TOKEN }} verbose: true From 981ce3eaf51e8efccb03c1c1ecc35a0a4cd6b4d2 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 2 Dec 2024 14:20:12 +0200 Subject: [PATCH 31/37] nss --- .github/workflows/check-vm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 1008118511..5e7843aac6 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -39,7 +39,7 @@ jobs: envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" prepare: | # This executes as root set -e - pkg install -y curl llvm + pkg install -y curl llvm nss pkgconf run: | # This executes as user set -e sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y @@ -57,7 +57,7 @@ jobs: envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" prepare: | # This executes as root set -e - pkg_add rust rust-clippy llvm-16.0.6p30 # rustup doesn't support OpenBSD at all + pkg_add rust rust-clippy llvm-16.0.6p30 nss pkgconf # rustup doesn't support OpenBSD at all run: | # This executes as user set -e export LIBCLANG_PATH=/usr/local/llvm16/lib @@ -81,7 +81,7 @@ jobs: prepare: | # This executes as root set -e /usr/sbin/pkg_add pkgin - pkgin -y install curl clang + pkgin -y install curl clang nss pkgconf run: | # This executes as user set -e sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y @@ -104,7 +104,7 @@ jobs: envs: "CARGO_TERM_COLOR RUST_BACKTRACE RUST_LOG GITHUB_ACTIONS" prepare: | # This executes as root set -e - pkg install clang-libs + pkg install clang-libs nss pkg-config run: | # This executes as also as root on Solaris set -e source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install) || true # This doesn't exit with zero on success From abd6d8177143a9cd20fe1da03bb01c8cdde64e9c Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 2 Dec 2024 14:56:06 +0200 Subject: [PATCH 32/37] Fix test condition --- neqo-common/src/hrtime.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/neqo-common/src/hrtime.rs b/neqo-common/src/hrtime.rs index 85859bb5d2..76390c1e4a 100644 --- a/neqo-common/src/hrtime.rs +++ b/neqo-common/src/hrtime.rs @@ -370,13 +370,9 @@ impl Drop for Time { } } -// Only run these tests in CI on Linux, where the timer accuracies are OK enough to pass the tests. -#[cfg(all( - test, - not(all(not(target_os = "linux"), feature = "ci")), - // Sanitizers are too slow to uphold timing assumptions. - not(neqo_sanitize), -))] +// Only run these tests in CI on Linux, where the timer accuracies are OK enough to pass the tests, +// but only when not running sanitizers. +#[cfg(all(test, target_os = "linux", not(neqo_sanitize)))] mod test { use std::{ thread::{sleep, spawn}, From 5bb3f140dff6e1c14c253c4f81b769fe74b5990c Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 2 Dec 2024 16:41:53 +0200 Subject: [PATCH 33/37] Don't sync `target` back to host --- .github/workflows/check-vm.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 5e7843aac6..abd4438fb1 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -49,6 +49,7 @@ jobs: cargo install cargo-llvm-cov --locked cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info cargo test --no-fail-fast --release + rm -rf target # Don't sync this back to host - if: matrix.os == 'openbsd' uses: vmactions/openbsd-vm@0cfe06e734a0ea3a546fca7ebf200b984b94d58a @@ -72,6 +73,7 @@ jobs: # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info cargo test --no-fail-fast # Remove this once profiler is supported cargo test --no-fail-fast --release + rm -rf target # Don't sync this back to host - if: matrix.os == 'netbsd' uses: vmactions/netbsd-vm@7c9086fdb4cc1aa814cda6e305390c2b966551a9 @@ -95,6 +97,7 @@ jobs: # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info cargo test --no-fail-fast # Remove this once profiler is supported cargo test --no-fail-fast --release + rm -rf target # Don't sync this back to host - if: matrix.os == 'solaris' uses: vmactions/solaris-vm@a89b9438868c70db27e41625f0a5de6ff5e90809 @@ -118,6 +121,7 @@ jobs: # cargo llvm-cov test --no-fail-fast --lcov --output-path lcov.info cargo test --no-fail-fast # Remove this once profiler is supported cargo test --no-fail-fast --release + rm -rf target # Don't sync this back to host - uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 with: From 1cb895114a063b62f316655ea203c42e09444749 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 10 Jan 2025 08:50:52 +0200 Subject: [PATCH 34/37] Check NSS version --- .github/workflows/check-vm.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index abd4438fb1..72e813d4a4 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -30,6 +30,10 @@ jobs: steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - id: nss-version + run: echo "minimum=$(cat neqo-crypto/min_version.txt)" >> "$GITHUB_OUTPUT" + - run: curl -o rustup.sh --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs - if: matrix.os == 'freebsd' @@ -41,6 +45,14 @@ jobs: set -e pkg install -y curl llvm nss pkgconf run: | # This executes as user + NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" + NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)"" + if ["$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then + # Only check on this OS if the system NSS is usable. + # Exit with no error otherwise. + echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION)" + exit 0 + fi set -e sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" From c2fc1f1fe851b05a9280f7084b46036014d815a0 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 10 Jan 2025 08:57:32 +0200 Subject: [PATCH 35/37] Fix --- .github/workflows/check-vm.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index 72e813d4a4..bc8a544bb8 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -46,11 +46,11 @@ jobs: pkg install -y curl llvm nss pkgconf run: | # This executes as user NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" - NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)"" - if ["$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then + NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)" + if [ "$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then # Only check on this OS if the system NSS is usable. # Exit with no error otherwise. - echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION)" + echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION); skipping checks" exit 0 fi set -e From 19ff4a16d4359c228bc64f5de90ab86b9fc1b3a7 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 10 Jan 2025 09:02:47 +0200 Subject: [PATCH 36/37] Check NSS version on all OSs --- .github/workflows/check-vm.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index bc8a544bb8..c68c478cb3 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -45,15 +45,14 @@ jobs: set -e pkg install -y curl llvm nss pkgconf run: | # This executes as user + set -e + # FIXME: We're only comparing the NSS minor version here. NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)" if [ "$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then - # Only check on this OS if the system NSS is usable. - # Exit with no error otherwise. echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION); skipping checks" exit 0 fi - set -e sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" cargo check --all-targets @@ -73,6 +72,13 @@ jobs: pkg_add rust rust-clippy llvm-16.0.6p30 nss pkgconf # rustup doesn't support OpenBSD at all run: | # This executes as user set -e + # FIXME: We're only comparing the NSS minor version here. + NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" + NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)" + if [ "$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then + echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION); skipping checks" + exit 0 + fi export LIBCLANG_PATH=/usr/local/llvm16/lib cargo check --all-targets cargo clippy -- -D warnings @@ -98,6 +104,13 @@ jobs: pkgin -y install curl clang nss pkgconf run: | # This executes as user set -e + # FIXME: We're only comparing the NSS minor version here. + NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" + NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)" + if [ "$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then + echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION); skipping checks" + exit 0 + fi sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" cargo check --all-targets @@ -122,6 +135,13 @@ jobs: pkg install clang-libs nss pkg-config run: | # This executes as also as root on Solaris set -e + # FIXME: We're only comparing the NSS minor version here. + NSS_MINOR_VERSION="$(pkg-config --modversion nss | cut -d. -f2)" + NSS_MINIMUM_VERSION="$(echo ${{ steps.nss-version.outputs.minimum }} | cut -d. -f2)" + if [ "$NSS_MINOR_VERSION" -lt "$NSS_MINIMUM_VERSION" ]; then + echo "System NSS package too old (minorversion $NSS_MINOR_VERSION < $NSS_MINIMUM_VERSION); skipping checks" + exit 0 + fi source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install) || true # This doesn't exit with zero on success export LIBCLANG_PATH="/usr/lib/amd64" cargo check --all-targets From a8d7e8c0cb37eb5bc0a9e54dbcdf42c2d46792fd Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 10 Jan 2025 10:04:55 +0200 Subject: [PATCH 37/37] `LD_LIBRARY_PATH` on NetBSD --- .github/workflows/check-vm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-vm.yml b/.github/workflows/check-vm.yml index c68c478cb3..041206bb4c 100644 --- a/.github/workflows/check-vm.yml +++ b/.github/workflows/check-vm.yml @@ -113,6 +113,8 @@ jobs: fi sh rustup.sh --default-toolchain stable --profile minimal --component clippy llvm-tools -y . "$HOME/.cargo/env" + # FIXME: Why do we need to set this on NetBSD? + export LD_LIBRARY_PATH=/usr/pkg/lib/nss:/usr/pkg/lib/nspr cargo check --all-targets cargo clippy -- -D warnings # FIXME: No profiler support in netbsd currently, error is: