-
Notifications
You must be signed in to change notification settings - Fork 618
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sccache to the build pipeline
- Loading branch information
Showing
1 changed file
with
23 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,11 @@ on: | |
schedule: | ||
- cron: '5 16 * * 6' | ||
|
||
env: | ||
CARGO_INCREMENTAL: 0 | ||
SCCACHE_GHA_ENABLED: "true" | ||
RUSTC_WRAPPER: "sccache" | ||
|
||
jobs: | ||
test_features: | ||
runs-on: ubuntu-latest | ||
|
@@ -19,9 +24,7 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Cache Cargo Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
uses: mozilla-actions/[email protected] | ||
- name: build | ||
run: cargo build -v --no-default-features --features "$FEATURES" | ||
env: | ||
|
@@ -52,9 +55,7 @@ jobs: | |
with: | ||
toolchain: ${{ matrix.rust }} | ||
- name: Cache Cargo Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
uses: mozilla-actions/[email protected] | ||
- name: build | ||
run: cargo build -v | ||
- name: test | ||
|
@@ -78,10 +79,7 @@ jobs: | |
with: | ||
crate: cross | ||
- name: Cache Cargo Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
key: ${{ matrix.arch }} | ||
uses: mozilla-actions/[email protected] | ||
- name: Start Docker (required for cross-rs) | ||
run: sudo systemctl start docker | ||
- name: Cross-Run Tests using QEMU | ||
|
@@ -94,6 +92,8 @@ jobs: | |
run: sudo apt update && sudo apt install ninja-build meson nasm | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@stable | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: build | ||
run: cargo build -v --no-default-features --features="avif,avif-native" | ||
env: | ||
|
@@ -108,6 +108,8 @@ jobs: | |
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- run: cargo clippy --all-features --all-targets -- -D warnings | ||
env: | ||
SYSTEM_DEPS_DAV1D_BUILD_INTERNAL: always | ||
|
@@ -120,12 +122,8 @@ jobs: | |
- uses: dtolnay/rust-toolchain@nightly | ||
- name: install-deps | ||
run: sudo apt-get -y install clang llvm | ||
- name: Cache Cargo Registry | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-targets: false | ||
cache-all-crates: true | ||
cache-on-failure: true | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: Install cargo-afl | ||
run: cargo install --locked -f cargo-afl | ||
- name: build | ||
|
@@ -144,6 +142,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: Install cargo-fuzz | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
|
@@ -158,6 +158,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: build | ||
run: | | ||
echo "#![deny(exported_private_dependencies)]" | cat - src/lib.rs > src/lib.rs.0 | ||
|
@@ -171,6 +173,8 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: build | ||
run: cargo build -v --benches --features=benchmarks | ||
|
||
|
@@ -181,6 +185,8 @@ jobs: | |
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
components: rustfmt | ||
- name: Cache Cargo Dependencies | ||
uses: mozilla-actions/[email protected] | ||
- name: Run rustfmt check | ||
run: cargo fmt -- --check | ||
|
||
|
@@ -195,9 +201,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Cache Cargo Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
cache-on-failure: true | ||
uses: mozilla-actions/[email protected] | ||
- uses: obi1kenobi/cargo-semver-checks-action@v2 | ||
with: | ||
feature-group: default-features |