From e34558d3e802f72e0928829e52e7e1960964d214 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Mon, 11 Mar 2024 15:10:47 +0200 Subject: [PATCH] While I'm here, make `actionlint` happy --- .github/workflows/bench.yml | 16 ++++++++-------- .github/workflows/check.yml | 24 +++++++++++++----------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 54b5ee4b10..8a0759e165 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -42,8 +42,8 @@ jobs: - name: Build run: | - cargo +$TOOLCHAIN bench --features bench --no-run - cargo +$TOOLCHAIN build --release --bin neqo-client --bin neqo-server + cargo "+$TOOLCHAIN" bench --features bench --no-run + cargo "+$TOOLCHAIN" build --release --bin neqo-client --bin neqo-server - name: Download cached main-branch results id: criterion-cache @@ -61,7 +61,7 @@ jobs: - name: Run cargo bench run: | taskset -c 0 nice -n -20 \ - cargo +$TOOLCHAIN bench --features bench | tee results.txt + cargo "+$TOOLCHAIN" bench --features bench | tee results.txt # Pin the transfer benchmark to core 0 and run it at elevated priority inside perf. # Work around https://github.com/flamegraph-rs/flamegraph/issues/248 by passing explicit perf arguments. @@ -72,7 +72,7 @@ jobs: mv target/criterion target/criterion-bench mv target/criterion-transfer-profile target/criterion || true taskset -c 0 nice -n -20 \ - cargo +$TOOLCHAIN flamegraph -v -c "$PERF_CMD" --features bench --bench transfer -- \ + cargo "+$TOOLCHAIN" flamegraph -v -c "$PERF_CMD" --features bench --bench transfer -- \ --bench --exact "Run multiple transfers with varying seeds" # And now restore the directories. mv target/criterion target/criterion-transfer-profile @@ -83,13 +83,13 @@ jobs: { mkdir server; \ cd server; \ taskset -c 0 nice -n -20 \ - cargo +$TOOLCHAIN flamegraph -v -c "$PERF_CMD" \ - --bin neqo-server -- --db ../test-fixture/db $HOST:4433 || true; } & + cargo "+$TOOLCHAIN" flamegraph -v -c "$PERF_CMD" \ + --bin neqo-server -- --db ../test-fixture/db "$HOST:4433" || true; } & mkdir client; \ cd client; \ time taskset -c 1 nice -n -20 \ - cargo +$TOOLCHAIN flamegraph -v -c "$PERF_CMD" \ - --bin neqo-client -- --output-dir . https://$HOST:4433/$SIZE + cargo "+$TOOLCHAIN" flamegraph -v -c "$PERF_CMD" \ + --bin neqo-client -- --output-dir . "https://$HOST:4433/$SIZE" killall -INT neqo-server cd ${{ github.workspace }} [ "$(wc -c < client/"$SIZE")" -eq "$SIZE" ] || exit 1 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4cfa81ee7f..63e22d618b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -72,8 +72,8 @@ jobs: - name: Use MSYS2 environment and install more dependencies (Windows) if: runner.os == 'Windows' run: | - echo "C:\\msys64\\usr\\bin" >> "$GITHUB_PATH" - echo "C:\\msys64\\mingw64\\bin" >> "$GITHUB_PATH" + printf "C:\msys64\usr\bin" >> "$GITHUB_PATH" + printf "C:\msys64\mingw64\bin" >> "$GITHUB_PATH" /c/msys64/usr/bin/pacman -S --noconfirm nsinstall python3 -m pip install git+https://github.com/nodejs/gyp-next echo "$(python3 -m site --user-base)/bin" >> "$GITHUB_PATH" @@ -85,9 +85,11 @@ jobs: - name: Set up NSS/NSPR build environment (Windows) if: runner.os == 'Windows' run: | - echo "GYP_MSVS_OVERRIDE_PATH=$VSINSTALLDIR" >> "$GITHUB_ENV" - echo "GYP_MSVS_VERSION=2022" >> "$GITHUB_ENV" - echo "BASH=$SHELL" >> "$GITHUB_ENV" + { + echo "GYP_MSVS_OVERRIDE_PATH=$VSINSTALLDIR" + echo "GYP_MSVS_VERSION=2022" + echo "BASH=$SHELL" + } >> "$GITHUB_ENV" # See https://github.com/ilammy/msvc-dev-cmd#name-conflicts-with-shell-bash rm /usr/bin/link.exe @@ -101,19 +103,19 @@ jobs: uses: ./.github/actions/nss - name: Build - run: cargo +${{ matrix.rust-toolchain }} build $BUILD_TYPE --all-targets --features ci + run: cargo +${{ matrix.rust-toolchain }} build "$BUILD_TYPE" --all-targets --features ci - name: Run tests and determine coverage run: | - cargo +${{ matrix.rust-toolchain }} llvm-cov nextest $BUILD_TYPE --all-targets --features ci --no-fail-fast --lcov --output-path lcov.info + cargo +${{ matrix.rust-toolchain }} llvm-cov nextest "$BUILD_TYPE" --all-targets --features ci --no-fail-fast --lcov --output-path lcov.info cargo +${{ matrix.rust-toolchain }} bench --features bench --no-run - name: Run client/server transfer run: | - cargo +${{ matrix.rust-toolchain }} build $BUILD_TYPE --bin neqo-client --bin neqo-server - target/$BUILD_DIR/neqo-server $HOST:4433 & + cargo +${{ matrix.rust-toolchain }} build "$BUILD_TYPE" --bin neqo-client --bin neqo-server + "target/$BUILD_DIR/neqo-server" "$HOST:4433" & PID=$! - target/$BUILD_DIR/neqo-client --output-dir . https://$HOST:4433/$SIZE + "target/$BUILD_DIR/neqo-client" --output-dir . "https://$HOST:4433/$SIZE" kill $PID [ "$(wc -c <"$SIZE")" -eq "$SIZE" ] || exit 1 env: @@ -127,7 +129,7 @@ jobs: if [ "${{ matrix.rust-toolchain }}" != "nightly" ]; then CONFIG_PATH="--config-path=$(mktemp)" fi - cargo +${{ matrix.rust-toolchain }} fmt --all -- --check $CONFIG_PATH + cargo +${{ matrix.rust-toolchain }} fmt --all -- --check "$CONFIG_PATH" if: success() || failure() - name: Clippy