build-caches #129
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [master] | |
schedule: | |
- cron: "30 3 * * 1" | |
env: | |
CARGO_UNSTABLE_SPARSE_REGISTRY: true | |
CARGO_INCREMENTAL: 0 | |
SCCACHE_GHA_ENABLED: true | |
RUSTC_WRAPPER: sccache | |
name: build-caches | |
jobs: | |
build-cache: | |
name: build rust cache (${{ matrix.runner }}, ${{ matrix.toolchain }}, ${{ matrix.target }}, ${{ matrix.async-feature }}) | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
toolchain: [1.67.1, stable, beta, nightly] | |
runner: [ubuntu-latest, macos-latest] | |
target: | |
[ | |
x86_64-unknown-linux-gnu, | |
x86_64-unknown-linux-musl, | |
x86_64-apple-darwin, | |
] | |
async-feature: [async, async-rustls] | |
exclude: | |
# don't run async for musl builds | |
- target: x86_64-unknown-linux-musl | |
async-feature: async | |
# don't run async-rustls on macOS to limit parallel macOS jobs | |
- runner: macos-latest | |
async-feature: async-rustls | |
# don't run when target <-> runner pair is invalid | |
- target: x86_64-apple-darwin | |
runner: ubuntu-latest | |
- target: x86_64-unknown-linux-gnu | |
runner: macos-latest | |
- target: x86_64-unknown-linux-musl | |
runner: macos-latest | |
steps: | |
- if: matrix.target == 'x86_64-unknown-linux-musl' | |
name: Add musl dependencies | |
run: | | |
set -ex | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- uses: actions/checkout@v3 | |
- id: toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
targets: ${{ matrix.target }} | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- name: Build cache | |
run: cargo test --no-default-features --features "sync image ${{ matrix.async-feature }}" --target ${{ matrix.target }} --no-run |