From 419f1fe14095c5fa8be3c844035ea131a59bd13b Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 14 May 2024 12:05:29 +0200 Subject: [PATCH 01/13] ci: better cargo test parameters + update dependencies --- .github/workflows/rust.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9b8acea5..cd52e65f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,20 +17,22 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Stable uses: dtolnay/rust-toolchain@stable with: toolchain: stable - - uses: Swatinem/rust-cache@v2.5.0 + - uses: Swatinem/rust-cache@v2.7.3 - name: "Build" run: cargo build - name: "Test" - run: cargo test --lib --bins --tests --examples --workspace + # Run all tests (bins, examples, lib, integration and docs) + # https://doc.rust-lang.org/cargo/commands/cargo-test.html#target-selection + run: cargo test - name: "Check documentation" # env: @@ -42,7 +44,7 @@ jobs: name: "Miri" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Miri run: | @@ -60,7 +62,7 @@ jobs: name: Rustfmt and Clippy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Nightly with rustfmt and clipy uses: dtolnay/rust-toolchain@stable From 8157dece9e7439ab5a1db5a2833ba6f8f12afb98 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 28 May 2024 22:09:19 +0200 Subject: [PATCH 02/13] test cargo update for problem with tlsn-utils --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cd52e65f..78da177e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -52,6 +52,9 @@ jobs: rustup override set nightly cargo miri setup + - name: Cargo update + run: cargo update + - name: Test with Miri on x86_64 run: cargo miri test -p clmul -p matrix-transpose --target x86_64-unknown-linux-gnu From 04fd9e1e4b4e798e66bc3a1978c2c04e6cd2babd Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 28 May 2024 22:26:30 +0200 Subject: [PATCH 03/13] test --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 78da177e..b97ec5f8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,6 +26,9 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 + - name: Cargo update + run: cargo update + - name: "Build" run: cargo build @@ -52,9 +55,6 @@ jobs: rustup override set nightly cargo miri setup - - name: Cargo update - run: cargo update - - name: Test with Miri on x86_64 run: cargo miri test -p clmul -p matrix-transpose --target x86_64-unknown-linux-gnu From 249014fba99e48c076099d68747b943c9569714d Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 28 May 2024 22:30:35 +0200 Subject: [PATCH 04/13] test --- .github/workflows/rust.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b97ec5f8..68c9385b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -49,11 +49,16 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install Miri - run: | - rustup toolchain install nightly --component miri - rustup override set nightly - cargo miri setup + - name: Stable + uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: miri + + - uses: Swatinem/rust-cache@v2.7.3 + + - name: Cargo update + run: cargo update - name: Test with Miri on x86_64 run: cargo miri test -p clmul -p matrix-transpose --target x86_64-unknown-linux-gnu @@ -73,6 +78,8 @@ jobs: toolchain: nightly components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2.7.3 + - name: "Check formatting" run: cargo +nightly fmt --check --all From 42ec24d87872ba811df4db882990add97cf7e3ee Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Tue, 28 May 2024 22:35:33 +0200 Subject: [PATCH 05/13] test --- .github/workflows/rust.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 68c9385b..d91282c2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,13 +13,13 @@ env: jobs: build_and_test: - if: ( ! github.event.pull_request.draft ) + name: "Build and Test" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Stable + - name: Install Rust Stable uses: dtolnay/rust-toolchain@stable with: toolchain: stable @@ -44,7 +44,8 @@ jobs: miri: if: ( ! github.event.pull_request.draft ) - name: "Miri" + name: "Test with Miri" + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -69,10 +70,11 @@ jobs: rustfmt_and_clippy: name: Rustfmt and Clippy runs-on: ubuntu-latest + steps: - uses: actions/checkout@v4 - - name: Nightly with rustfmt and clipy + - name: Install Rust Nightly with rustfmt and clippy uses: dtolnay/rust-toolchain@stable with: toolchain: nightly From 2c1b83ef4c5211328d17441ce3013979dd1f6da1 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 11:59:27 +0200 Subject: [PATCH 06/13] test order --- .github/workflows/rust.yml | 42 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d91282c2..82f80460 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,6 +12,27 @@ env: CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse jobs: + rustfmt_and_clippy: + name: Rustfmt and Clippy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust Nightly with rustfmt and clippy + uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2.7.3 + + - name: "Check formatting" + run: cargo +nightly fmt --check --all + + - name: Run Clippy + run: cargo clippy --all-targets --all-features + build_and_test: name: "Build and Test" runs-on: ubuntu-latest @@ -66,24 +87,3 @@ jobs: - name: Test with Miri on aarch64 run: cargo miri test -p clmul -p matrix-transpose --target aarch64-unknown-linux-gnu - - rustfmt_and_clippy: - name: Rustfmt and Clippy - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install Rust Nightly with rustfmt and clippy - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - components: rustfmt, clippy - - - uses: Swatinem/rust-cache@v2.7.3 - - - name: "Check formatting" - run: cargo +nightly fmt --check --all - - - name: Run Clippy - run: cargo clippy --all-targets --all-features \ No newline at end of file From 2c3430f2a05859599e2d228b7fde832a4c1f4e07 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 13:37:50 +0200 Subject: [PATCH 07/13] test --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 82f80460..9e096094 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -71,7 +71,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Stable + - name: Install Rust nightly with Miri uses: dtolnay/rust-toolchain@stable with: toolchain: nightly From 40e510bac913089db7f07dc257c26729984257f6 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 13:44:29 +0200 Subject: [PATCH 08/13] rust version --- .github/workflows/rust.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9e096094..39ade155 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -79,6 +79,9 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 + - name: Cargo version + run: cargo version --verbose + - name: Cargo update run: cargo update From c52fae6eb905d6294a10974e8be467b237725447 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 13:47:26 +0200 Subject: [PATCH 09/13] test targets --- .github/workflows/rust.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 39ade155..c84a3b4a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -76,6 +76,7 @@ jobs: with: toolchain: nightly components: miri + targets: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu - uses: Swatinem/rust-cache@v2.7.3 From 4f58d069d81091c2c8f4260e87f55d69baa45a73 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 13:58:28 +0200 Subject: [PATCH 10/13] test --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c84a3b4a..b710ea4d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,7 +9,6 @@ on: env: CARGO_TERM_COLOR: always - CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse jobs: rustfmt_and_clippy: From 8a2416b4ef73fb1ddde4992bb6c996cfbf5e0e58 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 14:17:04 +0200 Subject: [PATCH 11/13] test --- .github/workflows/rust.yml | 41 +++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b710ea4d..850d50ab 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,26 +11,6 @@ env: CARGO_TERM_COLOR: always jobs: - rustfmt_and_clippy: - name: Rustfmt and Clippy - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install Rust Nightly with rustfmt and clippy - uses: dtolnay/rust-toolchain@stable - with: - toolchain: nightly - components: rustfmt, clippy - - - uses: Swatinem/rust-cache@v2.7.3 - - - name: "Check formatting" - run: cargo +nightly fmt --check --all - - - name: Run Clippy - run: cargo clippy --all-targets --all-features build_and_test: name: "Build and Test" @@ -62,6 +42,27 @@ jobs: # RUSTDOCFLAGS: -D warnings run: cargo doc --no-deps --workspace --lib --document-private-items --examples + rustfmt_and_clippy: + name: Rustfmt and Clippy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust Nightly with rustfmt and clippy + uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2.7.3 + + - name: "Check formatting" + run: cargo +nightly fmt --check --all + + - name: Run Clippy + run: cargo clippy --all-targets --all-features + miri: if: ( ! github.event.pull_request.draft ) name: "Test with Miri" From 55941cf962f7250f41b71a1f403c3722f76e4796 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 29 May 2024 14:24:51 +0200 Subject: [PATCH 12/13] matrix strategy --- .github/workflows/rust.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 850d50ab..d717206c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -66,8 +66,10 @@ jobs: miri: if: ( ! github.event.pull_request.draft ) name: "Test with Miri" - runs-on: ubuntu-latest + strategy: + matrix: + target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] steps: - uses: actions/checkout@v4 @@ -76,18 +78,15 @@ jobs: with: toolchain: nightly components: miri - targets: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu + targets: ${{ matrix.target }} - uses: Swatinem/rust-cache@v2.7.3 - - name: Cargo version - run: cargo version --verbose + - name: Build + run: | + cargo version --verbose + cargo update + cargo build --target ${{ matrix.target }} - - name: Cargo update - run: cargo update - - - name: Test with Miri on x86_64 - run: cargo miri test -p clmul -p matrix-transpose --target x86_64-unknown-linux-gnu - - - name: Test with Miri on aarch64 - run: cargo miri test -p clmul -p matrix-transpose --target aarch64-unknown-linux-gnu + - name: Test with Miri on ${{ matrix.target }} + run: cargo miri test -p clmul -p matrix-transpose --target ${{ matrix.target }} From f9ec1b688d46f3d678f2bbbfc4aa30d5910c71cd Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Thu, 30 May 2024 12:24:48 +0200 Subject: [PATCH 13/13] cleanup --- .github/workflows/rust.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d717206c..aee84878 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,9 +26,6 @@ jobs: - uses: Swatinem/rust-cache@v2.7.3 - - name: Cargo update - run: cargo update - - name: "Build" run: cargo build @@ -78,15 +75,10 @@ jobs: with: toolchain: nightly components: miri - targets: ${{ matrix.target }} - uses: Swatinem/rust-cache@v2.7.3 - - name: Build + - name: Test with Miri on ${{ matrix.target }} run: | cargo version --verbose - cargo update - cargo build --target ${{ matrix.target }} - - - name: Test with Miri on ${{ matrix.target }} - run: cargo miri test -p clmul -p matrix-transpose --target ${{ matrix.target }} + cargo miri test -p clmul -p matrix-transpose --target ${{ matrix.target }}