Speed up the Build workflow (#7961)

- Pass the MariaDB client library to mysqlclient-sys through its environment variables, so a cached build no longer recompiles mysqlclient-sys, diesel and diesel_migrations in every MySQL build. The cache prefix changes once, because the old caches would keep rebuilding it.
- Drop the sqlite,mysql,postgresql,enable_mimalloc test: enable_mimalloc is still tested on and off.
- Test and lint unsafe_test_mode in the all-features runs instead of separate SQLite-only ones: it only adds the test seeder.
- Only save caches on main, in the Build and SDK live tests workflows, to save cache space.
This commit is contained in:
Daniel García authored and GitHub committed 2026-11-14 10:53:09 +01:00
1 parent df1e918c79
commit 644ddfa000
2 files changed
+31 -34

No files matched your search

+4 -1
View File
@@ -105,7 +105,8 @@ jobs:
rustup component add rust-src
fi
# One cache per SDK source, so that neither restores the other's
# One cache per SDK source, so that neither restores the other's.
# Only save caches on main to save cache space.
- name: "Cache Rust builds"
if: ${{ steps.sdk.outputs.source == 'npm' }}
uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
@@ -113,6 +114,7 @@ jobs:
key: sdk-live-tests-npm
add-job-id-key: false
workspaces: ". -> target"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Cache Rust builds (with the SDK)"
if: ${{ steps.sdk.outputs.source == 'git' }}
@@ -123,6 +125,7 @@ jobs:
workspaces: |
. -> target
sdk-internal -> target
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: "Setup Node"
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0