-
Notifications
You must be signed in to change notification settings - Fork 15
ci: cache check-features #2613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ci: cache check-features #2613
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| name: Build Check Features Cache | ||
|
|
||
| permissions: | ||
| contents: read | ||
| actions: write | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - "main" | ||
| paths: | ||
| - "src/**" | ||
| - "Cargo.toml" | ||
| - "Cargo.lock" | ||
| - "rust-toolchain.toml" | ||
| - "tests/fixtures/**" | ||
| - "static/**" | ||
| - ".sqlx/**" | ||
|
|
||
| env: | ||
| CACHE_CHECK_KEY: check-features-release | ||
| CACHE_PATH: | | ||
| ~/.cargo/registry/index/ | ||
| ~/.cargo/registry/cache/ | ||
| ~/.cargo/git/db/ | ||
| target/ | ||
|
|
||
| jobs: | ||
| build_check_features_cache: | ||
| name: Build Check Features cache | ||
| runs-on: stratus-runner | ||
| timeout-minutes: 45 | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} | ||
| cancel-in-progress: true | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
|
|
||
| - name: Set up Rust | ||
| run: rustup show | ||
|
|
||
| - name: Rust Cache - Restore check-features cache | ||
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| with: | ||
| path: ${{ env.CACHE_PATH }} | ||
| key: ${{ env.CACHE_CHECK_KEY }}-${{ runner.os }}--${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: ${{ env.CACHE_CHECK_KEY }}-${{ runner.os }}-- | ||
|
|
||
| - name: Install libsasl2-dev libssl-dev | ||
| run: sudo apt-get update && sudo apt install -y build-essential pkg-config libssl-dev libsasl2-dev | ||
|
|
||
| - name: Set up dependencies | ||
| uses: taiki-e/install-action@cfdb446e391c69574ebc316dfb7d7849ec12b940 # v2.68.8 | ||
| with: | ||
| tool: cargo-hack@0.6.39 | ||
|
|
||
| - name: Set up Just | ||
| uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2 | ||
|
|
||
| - name: Prime check-features cache | ||
| # Runs the exact same command (`just check-features`) with the same env as the | ||
| # PR check-features job, so the `.rmeta` fingerprints produced here are reused | ||
| # on cache restore. No coverage flags in either side, so RUSTFLAGS matches by | ||
| # inheritance — do not override it here, that would diverge from the consumer. | ||
| run: just check-features | ||
| env: | ||
| CARGO_PROFILE_RELEASE_DEBUG: 0 | ||
| RUST_LOG: error | ||
| RELEASE: 1 | ||
|
|
||
| - name: Rust Cache - Save check-features cache | ||
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | ||
| with: | ||
| path: ${{ env.CACHE_PATH }} | ||
| key: ${{ env.CACHE_CHECK_KEY }}-${{ runner.os }}--${{ hashFiles('**/Cargo.lock') }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.