diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 07fece38..685390bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,7 +52,7 @@ jobs: test: runs-on: ubuntu-latest - # The test run plus the release build of a DataFusion workspace: 20 minutes was cut mid-link. + # The release build runs once per OS in test-cross-platform, not here. timeout-minutes: 45 steps: - name: Checkout repository @@ -66,6 +66,12 @@ jobs: cache: true github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + # Pull requests restore main's cache; only main saves, to stay inside the cache quota. + save-if: ${{ github.ref == 'refs/heads/main' }} + - name: Free runner disk for the DataFusion test binaries if: runner.os == 'Linux' run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc @@ -73,9 +79,6 @@ jobs: - name: Run tests (all features) run: mise x -- cargo nextest run --profile ci --all-features - - name: Build release - run: mise x -- cargo build --release --all-features - test-cross-platform: strategy: matrix: @@ -121,6 +124,12 @@ jobs: cache: true github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + # Pull requests restore main's cache; only main saves, to stay inside the cache quota. + save-if: ${{ github.ref == 'refs/heads/main' }} + # Run tests and build the release binary - name: Free runner disk for the DataFusion test binaries if: runner.os == 'Linux' @@ -147,6 +156,12 @@ jobs: cache: true github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Cache cargo registry and dependency builds + uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 + with: + # Pull requests restore main's cache; only main saves, to stay inside the cache quota. + save-if: ${{ github.ref == 'refs/heads/main' }} + - name: Free runner disk for the DataFusion test binaries if: runner.os == 'Linux' run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc