diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2343a3d3e..0d2688ac33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: with: # Full git history is needed to get a proper list of changed files within `mega-linter` fetch-depth: 0 + - name: Run Mega Linter uses: oxsecurity/megalinter/flavors/javascript@v7 env: @@ -36,6 +37,11 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 + with: + sweep-cache: true + - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev @@ -49,6 +55,11 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 + with: + sweep-cache: true - name: Check hide-lines run: cd write-rustdoc-hide-lines && cargo run --release -- check ../content @@ -61,6 +72,11 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 + with: + sweep-cache: true + - name: Install alsa and udev run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev @@ -92,6 +108,14 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 + with: + sweep-cache: true + - name: Get current date id: date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT @@ -127,15 +151,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - generate-errors/target/ - key: ${{ runner.os }}-generate-errors-${{ hashFiles('generate-errors/Cargo.toml') }} + sweep-cache: true - name: "Build Bevy Error Codes" run: > @@ -158,6 +180,11 @@ jobs: with: target: wasm32-unknown-unknown + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 + with: + sweep-cache: true + - name: "Build Bevy Examples" run: | cd generate-wasm-examples && @@ -181,15 +208,13 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/cache@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo files + uses: Leafwing-Studios/cargo-cache@v2 with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - generate-community/target/ - key: ${{ runner.os }}-generate-community-${{ hashFiles('generate-community/Cargo.toml') }} + sweep-cache: true - name: "Build Bevy Community" run: >