From 8625b014e2ef3b814bf9e369678ae1d4b5753694 Mon Sep 17 00:00:00 2001 From: MrCroxx Date: Thu, 19 Sep 2024 03:31:27 +0000 Subject: [PATCH 1/4] chore: enable nightly check on CI Signed-off-by: MrCroxx --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c14a51b7..32b656e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust_toolchain: [stable, 1.81.0] + rust_toolchain: [stable, 1.81.0, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}] runs-on: ${{ matrix.os }} steps: - name: Checkout From 59adc0db05433ccc97623831151e1df91800c279 Mon Sep 17 00:00:00 2001 From: MrCroxx Date: Thu, 19 Sep 2024 03:34:52 +0000 Subject: [PATCH 2/4] chore: fix yaml Signed-off-by: MrCroxx --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32b656e4..0babfc15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: - RUST_TOOLCHAIN_NIGHTLY: nightly-2024-07-19 CARGO_TERM_COLOR: always CACHE_KEY_SUFFIX: 20240821 @@ -122,7 +121,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - rust_toolchain: [stable, 1.81.0, ${{ env.RUST_TOOLCHAIN_NIGHTLY }}] + rust_toolchain: [stable, 1.81.0, nightly-2024-07-19] runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -250,7 +249,7 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }} + toolchain: nightly-2024-07-19 - name: Cache Cargo home uses: actions/cache@v4 id: cache @@ -268,7 +267,7 @@ jobs: RUST_LOG: info CI: true run: |- - cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture + cargo +nightly-2024-07-19 test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture - name: Run foyer-bench With Address Sanitizer env: RUST_BACKTRACE: 1 @@ -276,7 +275,7 @@ jobs: RUST_LOG: info CI: true run: |- - cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} build --all --target x86_64-unknown-linux-gnu + cargo +nightly-2024-07-19 build --all --target x86_64-unknown-linux-gnu mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-bench/asan timeout 2m ./target/x86_64-unknown-linux-gnu/debug/foyer-bench --dir $GITHUB_WORKSPACE/foyer-data/foyer-bench/asan --mem 16MiB --disk 256MiB --region-size 16MiB --get-range 1000 --w-rate 1MiB --r-rate 1MiB --admission-rate-limit 10MiB --time 60 - name: Prepare Artifacts on Failure @@ -298,7 +297,7 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }} + toolchain: nightly-2024-07-19 - name: Cache Cargo home uses: actions/cache@v4 id: cache @@ -316,7 +315,7 @@ jobs: RUST_LOG: info CI: true run: |- - cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture + cargo +nightly-2024-07-19 test --lib --bins --tests --target x86_64-unknown-linux-gnu -- --nocapture - name: Run foyer-bench With Leak Sanitizer env: RUST_BACKTRACE: 1 @@ -324,7 +323,7 @@ jobs: RUST_LOG: info CI: true run: |- - cargo +${{ env.RUST_TOOLCHAIN_NIGHTLY }} build --all --target x86_64-unknown-linux-gnu + cargo +nightly-2024-07-19 build --all --target x86_64-unknown-linux-gnu mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-bench/lsan timeout 2m ./target/x86_64-unknown-linux-gnu/debug/foyer-bench --dir $GITHUB_WORKSPACE/foyer-data/foyer-bench/lsan --mem 16MiB --disk 256MiB --region-size 16MiB --get-range 1000 --w-rate 1MiB --r-rate 1MiB --admission-rate-limit 10MiB --time 60 - name: Prepare Artifacts on Failure From 358072ee936a327f93b8c028d283cbeaaef70cd4 Mon Sep 17 00:00:00 2001 From: MrCroxx Date: Thu, 19 Sep 2024 03:41:37 +0000 Subject: [PATCH 3/4] fix: fix nightly ci pipeline Signed-off-by: MrCroxx --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0babfc15..c8a788ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -160,6 +160,7 @@ jobs: run: | cargo fmt --all -- --check - name: Run rust clippy check + if: matrix.rust_toolchain != 'nightly-2024-07-19' run: | cargo clippy --all-targets --features tokio-console -- -D warnings cargo clippy --all-targets --features deadlock -- -D warnings @@ -170,18 +171,47 @@ jobs: - if: steps.cache.outputs.cache-hit != 'true' uses: taiki-e/install-action@nextest - name: Run rust test with coverage (igored tests) + if: matrix.rust_toolchain != 'nightly-2024-07-19' env: RUST_BACKTRACE: 1 CI: true run: | cargo llvm-cov --no-report nextest --run-ignored ignored-only --no-capture --workspace --features "strict_assertions,sanity" + - name: Run rust test with coverage (igored tests) - nightly + if: matrix.rust_toolchain == 'nightly-2024-07-19' + env: + RUST_BACKTRACE: 1 + CI: true + run: | + cargo llvm-cov --no-report nextest --run-ignored ignored-only --no-capture --workspace --features "strict_assertions,sanity,nightly" - name: Run rust test with coverage + if: matrix.rust_toolchain != 'nightly-2024-07-19' env: RUST_BACKTRACE: 1 CI: true run: | cargo llvm-cov --no-report nextest --features "strict_assertions,sanity" + - name: Run rust test with coverage - nightly + if: matrix.rust_toolchain == 'nightly-2024-07-19' + env: + RUST_BACKTRACE: 1 + CI: true + run: | + cargo llvm-cov --no-report nextest --features "strict_assertions,sanity,nightly" - name: Run examples with coverage + if: matrix.rust_toolchain != 'nightly-2024-07-19' + env: + RUST_BACKTRACE: 1 + CI: true + run: | + cargo llvm-cov --no-report run --example memory + cargo llvm-cov --no-report run --example hybrid + cargo llvm-cov --no-report run --example hybrid_full + cargo llvm-cov --no-report run --example event_listener + cargo llvm-cov --no-report run --features "mtrace,jaeger" --example tail_based_tracing + cargo llvm-cov --no-report run --features "mtrace,ot" --example tail_based_tracing + - name: Run examples with coverage - nightly + if: matrix.rust_toolchain == 'nightly-2024-07-19' env: RUST_BACKTRACE: 1 CI: true @@ -193,7 +223,15 @@ jobs: cargo llvm-cov --no-report run --features "mtrace,jaeger" --example tail_based_tracing cargo llvm-cov --no-report run --features "mtrace,ot" --example tail_based_tracing - name: Run foyer-bench with coverage - if: runner.os == 'Linux' + if: runner.os == 'Linux' && matrix.rust_toolchain != 'nightly-2024-07-19' + env: + RUST_BACKTRACE: 1 + CI: true + run: | + mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-bench/codecov + cargo llvm-cov --no-report run --package foyer-bench --bin foyer-bench --features "strict_assertions,sanity" -- --dir $GITHUB_WORKSPACE/foyer-data/foyer-bench/codecov --mem 16MiB --disk 256MiB --region-size 16MiB --get-range 1000 --w-rate 1MiB --r-rate 1MiB --admission-rate-limit 10MiB --time 60 + - name: Run foyer-bench with coverage - nightly + if: runner.os == 'Linux' && matrix.rust_toolchain == 'nightly-2024-07-19' env: RUST_BACKTRACE: 1 CI: true From ccbc7e55fb55a769da2bd25c3694202c6473bce6 Mon Sep 17 00:00:00 2001 From: MrCroxx Date: Thu, 19 Sep 2024 03:50:46 +0000 Subject: [PATCH 4/4] fix: enable nightly feature Signed-off-by: MrCroxx --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8a788ea..7f356dc8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -216,12 +216,12 @@ jobs: RUST_BACKTRACE: 1 CI: true run: | - cargo llvm-cov --no-report run --example memory - cargo llvm-cov --no-report run --example hybrid - cargo llvm-cov --no-report run --example hybrid_full - cargo llvm-cov --no-report run --example event_listener - cargo llvm-cov --no-report run --features "mtrace,jaeger" --example tail_based_tracing - cargo llvm-cov --no-report run --features "mtrace,ot" --example tail_based_tracing + cargo llvm-cov --no-report run --features "nightly" --example memory + cargo llvm-cov --no-report run --features "nightly" --example hybrid + cargo llvm-cov --no-report run --features "nightly" --example hybrid_full + cargo llvm-cov --no-report run --features "nightly" --example event_listener + cargo llvm-cov --no-report run --features "mtrace,jaeger,nightly" --example tail_based_tracing + cargo llvm-cov --no-report run --features "mtrace,ot,nightly" --example tail_based_tracing - name: Run foyer-bench with coverage if: runner.os == 'Linux' && matrix.rust_toolchain != 'nightly-2024-07-19' env: @@ -237,7 +237,7 @@ jobs: CI: true run: | mkdir -p $GITHUB_WORKSPACE/foyer-data/foyer-bench/codecov - cargo llvm-cov --no-report run --package foyer-bench --bin foyer-bench --features "strict_assertions,sanity" -- --dir $GITHUB_WORKSPACE/foyer-data/foyer-bench/codecov --mem 16MiB --disk 256MiB --region-size 16MiB --get-range 1000 --w-rate 1MiB --r-rate 1MiB --admission-rate-limit 10MiB --time 60 + cargo llvm-cov --no-report run --package foyer-bench --bin foyer-bench --features "strict_assertions,sanity,nightly" -- --dir $GITHUB_WORKSPACE/foyer-data/foyer-bench/codecov --mem 16MiB --disk 256MiB --region-size 16MiB --get-range 1000 --w-rate 1MiB --r-rate 1MiB --admission-rate-limit 10MiB --time 60 - name: Generate codecov report run: | cargo llvm-cov report --lcov --output-path lcov.info