Skip to content

Attempt to cache prime generators #300

Attempt to cache prime generators

Attempt to cache prime generators #300

Workflow file for this run

name: Rs
on:
push:
paths:
- 'rust/**'
- '!rust/README.rst'
schedule:
- cron: "0 0 1 * *"
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Rust
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- nightly # currently = 1.81
- beta # currently = 1.80
- stable # currently = 1.79
os:
- ubuntu-latest
- windows-latest
include:
- toolchain: stable
os: macos-13
- toolchain: stable
os: macos-latest
- toolchain: "1.78"
os: ubuntu-latest
- toolchain: "1.77"
os: ubuntu-latest
- toolchain: "1.76"
os: ubuntu-latest
- toolchain: "1.75"
os: ubuntu-latest
- toolchain: "1.74"
os: ubuntu-latest
- toolchain: "1.73"
os: ubuntu-latest
- toolchain: "1.72"
os: ubuntu-latest
- toolchain: "1.71"
os: ubuntu-latest
- toolchain: "1.70"
os: ubuntu-latest
- toolchain: "1.69"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- run: rustup default ${{ matrix.toolchain }}
- run: cd rust && cargo test
if: ${{ matrix.toolchain != 'nightly' }}
env:
RUSTFLAGS: '-Copt-level=2'
- run: cd rust && cargo test
if: ${{ matrix.toolchain == 'nightly' }}
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Copt-level=1'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Copt-level=1'
- name: rust-grcov
if: ${{ matrix.toolchain == 'nightly' }}
run: cargo install grcov && grcov rust --path-mapping rust/mapping.json -t cobertura -o .
- name: Upload coverage reports to Codecov
if: ${{ matrix.toolchain == 'nightly' }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: Rust