Skip to content

Commit

Permalink
ci: Setup so that most checks run in merge queue only
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Mar 9, 2024
1 parent 77dd957 commit fe3eb5a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 53 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/merge-check.yml

This file was deleted.

46 changes: 45 additions & 1 deletion .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ on:
pull_request:
merge_group:

name: PR Check
name: CI Check

env:
CARGO_TERM_COLOR: always
HOST: x86_64-unknown-linux-gnu
FEATURES: "test docs"
RUSTFLAGS: "-D warnings"

jobs:
Expand All @@ -23,3 +25,45 @@ jobs:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --features docs
tests:
if: ${{ github.event_name == 'merge_group' }}
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
- 1.51.0 # MSRV

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: powerpc-unknown-linux-gnu
- rust: stable
target: i686-unknown-linux-gnu

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 }}

0 comments on commit fe3eb5a

Please sign in to comment.