Skip to content

Further ci updates - numeric tests, and run all tests on PRs #17

Further ci updates - numeric tests, and run all tests on PRs

Further ci updates - numeric tests, and run all tests on PRs #17

Workflow file for this run

on:
pull_request:
merge_group:
name: Continuous integration
env:
CARGO_TERM_COLOR: always
HOST: x86_64-unknown-linux-gnu
FEATURES: "test docs"
RUSTFLAGS: "-D warnings"
jobs:
clippy:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- beta
name: clippy/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --features docs
tests:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.51.0 # MSRV
name: tests/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: Install openblas
run: sudo apt-get install libopenblas-dev gfortran
- run: ./scripts/all-tests.sh "$FEATURES" ${{ matrix.rust }}
cross_test:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- rust: stable
target: s390x-unknown-linux-gnu
- rust: stable
target: i686-unknown-linux-gnu
name: cross_test/${{ matrix.target }}/${{ matrix.rust }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Install cross
run: cargo install cross
- run: ./scripts/cross-tests.sh "docs" ${{ matrix.rust }} ${{ matrix.target }}
conclusion:
needs:
- clippy
- tests
- cross_test
if: always()
runs-on: ubuntu-latest
steps:
- name: Result
run: |
jq -C <<< "${needs}"
# Check if all needs were successful or skipped.
"$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
env:
needs: ${{ toJson(needs) }}