Skip to content
23 changes: 19 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -66,16 +66,19 @@ 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

- 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:
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand Down
Loading