Skip to content

Commit

Permalink
speed up tests and reduce action-minutes used
Browse files Browse the repository at this point in the history
  • Loading branch information
MusicalNinjaDad committed Apr 5, 2024
1 parent 4ab7334 commit 2867622
Showing 1 changed file with 8 additions and 74 deletions.
82 changes: 8 additions & 74 deletions .github/workflows/ci-quick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,83 +61,22 @@ jobs:

clippy:
needs: [fmt]
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: true
matrix:
rust: [stable]
platform: [
{
os: "macos-14", # first available arm macos runner
python-architecture: "arm64",
rust-target: "aarch64-apple-darwin",
},
{
os: "ubuntu-latest",
python-architecture: "x64",
rust-target: "x86_64-unknown-linux-gnu",
},
{
os: "ubuntu-latest",
python-architecture: "x64",
rust-target: "powerpc64le-unknown-linux-gnu",
},
{
os: "ubuntu-latest",
python-architecture: "x64",
rust-target: "s390x-unknown-linux-gnu",
},
{
os: "ubuntu-latest",
python-architecture: "x64",
rust-target: "wasm32-wasi",
},
{
os: "windows-latest",
python-architecture: "x64",
rust-target: "x86_64-pc-windows-msvc",
},
{
os: "windows-latest",
python-architecture: "x86",
rust-target: "i686-pc-windows-msvc",
},
]
include:
# Run beta clippy as a way to detect any incoming lints which may affect downstream users
- rust: beta
platform:
{
os: "ubuntu-latest",
python-architecture: "x64",
rust-target: "x86_64-unknown-linux-gnu",
}
name: clippy/${{ matrix.platform.rust-target }}/${{ matrix.rust }}
continue-on-error: ${{ matrix.rust != 'stable' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.platform.rust-target }}
components: clippy,rust-src
- uses: actions/setup-python@v5
with:
architecture: ${{ matrix.platform.python-architecture }}
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name != 'merge_group' }}
- run: python -m pip install --upgrade pip && pip install nox
- run: nox -s clippy-all
env:
CARGO_BUILD_TARGET: ${{ matrix.platform.rust-target }}
- run: nox -s clippy

tests:
name: test ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
runs-on: ${{ matrix.os }}
name: test rust skip-full
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -148,15 +87,11 @@ jobs:
with:
components: rust-src
- run: python -m pip install --upgrade pip && pip install nox
- run: nox -s test
- run: nox -s test-rust -- skip-full

coverage:
needs: [tests]
name: coverage ${{ matrix.os }}
strategy:
matrix:
os: ["windows-latest", "macos-14", "ubuntu-latest"] # first available arm macos runner
runs-on: ${{ matrix.os }}
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -173,5 +108,4 @@ jobs:
- uses: codecov/codecov-action@v4
with:
file: coverage.json
name: ${{ matrix.os }}
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 2867622

Please sign in to comment.