diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 0f0c455..f1ac0d7 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -1,15 +1,20 @@ -name: Lint GitHub Actions workflows -on: [push, pull_request] +name: actionlint + +on: + push: + branches: [main, master] + pull_request: + +# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that +# we don't waste CI time +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true jobs: actionlint: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - name: Download actionlint - id: get_actionlint - run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) - shell: bash - - name: Check workflow files - run: ${{ steps.get_actionlint.outputs.executable }} -color - shell: bash + - name: actionlint + uses: raven-actions/actionlint@v2.0.1 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index a34c803..ab7fd81 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -45,8 +45,7 @@ jobs: strategy: fail-fast: false matrix: - # Get early warning of new lints which are regularly introduced in beta channels. - toolchain: [stable, beta] + toolchain: [nightly-2025-06-29] steps: - uses: actions/checkout@v4 with: @@ -56,6 +55,7 @@ jobs: with: toolchain: ${{ matrix.toolchain }} components: clippy + - run: cargo clippy --version - name: cargo clippy run: cargo clippy --all-targets --all-features env: @@ -106,10 +106,17 @@ jobs: - uses: actions/checkout@v4 with: submodules: true + - name: Install nightly + uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly + - name: Generate minimal lockfile + run: cargo generate-lockfile -Z minimal-versions - name: Install ${{ matrix.msrv }} uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.msrv }} + - run: rustc --version - name: cargo +${{ matrix.msrv }} check run: cargo check env: diff --git a/.github/workflows/safety.yml b/.github/workflows/safety.yml index be1ef5c..0bc2261 100644 --- a/.github/workflows/safety.yml +++ b/.github/workflows/safety.yml @@ -84,4 +84,5 @@ jobs: timeout-minutes: 220 uses: model-checking/kani-github-action@v1 with: - kani-version: '0.54.0' + kani-version: '0.63.0' + args: --fail-fast diff --git a/src/utils/arbitrary.rs b/src/utils/arbitrary.rs index 4e785a5..6b4e165 100644 --- a/src/utils/arbitrary.rs +++ b/src/utils/arbitrary.rs @@ -11,7 +11,7 @@ use proptest::sample::SizeRange; type Mat = MatBase, T>; impl Mat { - pub fn to_ref(&self) -> MatRef { + pub fn to_ref<'a>(&'a self) -> MatRef<'a, T> { MatRef::from_parts( self.nrows(), self.ncols(), diff --git a/tests/comparison.rs b/tests/comparison.rs index 70de0d5..3c73d85 100644 --- a/tests/comparison.rs +++ b/tests/comparison.rs @@ -25,7 +25,7 @@ fn bench_aarch64_f32() { let t_neon = display_duration(time_with(&neon_kernel, n, TRIES)); let t_faer = display_duration(time_with(&faer_kernel, n, TRIES)); let t_mt = display_duration(time_with(&mt_kernel, n, TRIES)); - println!("{0:>4} {1:>14} {2:>14} {3:>14}", n, t_neon, t_faer, t_mt); + println!("{n:>4} {t_neon:>14} {t_faer:>14} {t_mt:>14}"); } } @@ -49,7 +49,7 @@ fn display_duration(t: Duration) -> String { format!("{}.{}{}", num.trunc(), fract, unit) } }; - let s = format!("{:?}", t); + let s = format!("{t:?}"); if s.contains("ms") { pretty(s, "ms") diff --git a/tests/neon.rs b/tests/neon.rs index 1b6afc3..284dc70 100644 --- a/tests/neon.rs +++ b/tests/neon.rs @@ -93,6 +93,6 @@ impl<'a> TestCase<'a> { param.pack_sizes, &mut packing_buf, ); - assert_eq!(actual.as_slice(), param.expect, "{:?}", self); + assert_eq!(actual.as_slice(), param.expect, "{self:?}"); } }