mirror of
https://github.com/bitwarden/browser
synced 2026-01-31 00:33:33 +00:00
Add compilation caching
This commit is contained in:
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
@@ -140,6 +140,9 @@ jobs:
|
||||
- name: Cache cargo registry
|
||||
uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
|
||||
|
||||
- name: Run cargo fmt
|
||||
working-directory: ./apps/desktop/desktop_native
|
||||
run: cargo +nightly fmt --check
|
||||
@@ -149,6 +152,7 @@ jobs:
|
||||
run: cargo clippy --all-features --tests
|
||||
env:
|
||||
RUSTFLAGS: "-D warnings"
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
- name: Cache cargo-sort
|
||||
id: cache-cargo-sort
|
||||
|
||||
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
@@ -117,9 +117,14 @@ jobs:
|
||||
with:
|
||||
workspaces: "apps/desktop/desktop_native -> target"
|
||||
|
||||
- name: Setup sccache
|
||||
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
|
||||
|
||||
- name: Build
|
||||
working-directory: ./apps/desktop/desktop_native
|
||||
run: cargo build
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
- name: Test Ubuntu
|
||||
if: ${{ matrix.os=='ubuntu-22.04' }}
|
||||
@@ -131,16 +136,22 @@ jobs:
|
||||
eval "$(printf '\n' | gnome-keyring-daemon --unlock)"
|
||||
eval "$(printf '\n' | /usr/bin/gnome-keyring-daemon --start)"
|
||||
cargo test -- --test-threads=1
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
- name: Test macOS
|
||||
if: ${{ matrix.os=='macos-14' }}
|
||||
working-directory: ./apps/desktop/desktop_native
|
||||
run: cargo test -- --test-threads=1
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
- name: Test Windows
|
||||
if: ${{ matrix.os=='windows-2022'}}
|
||||
working-directory: ./apps/desktop/desktop_native
|
||||
run: cargo test --workspace --exclude=desktop_napi -- --test-threads=1
|
||||
env:
|
||||
RUSTC_WRAPPER: sccache
|
||||
|
||||
rust-coverage:
|
||||
name: Rust Coverage
|
||||
|
||||
Reference in New Issue
Block a user