-
Notifications
You must be signed in to change notification settings - Fork 0
Add CI workflow with sccache integration test #2
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
Changes from 3 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
db7ff2d
Update CI for spiceio rename and sccache integration test
lukekim ad27c64
Address CI PR review comments
lukekim 406cbaf
Add release workflow triggered on GitHub release creation
lukekim b40a120
Add setup action for installing spiceio in other workflows
lukekim 624ca22
Address PR #2 review comments (round 2)
lukekim 953fedb
Trigger CI on PR sync (push to PR branch)
lukekim ee06e6f
Address PR #2 review comments (round 3)
lukekim 6d6bc7f
Skip setup if spiceio is already running on the bind address
lukekim 87fda4f
Use release-downloader action instead of gh CLI script
lukekim f44be2b
Use gh CLI instead of third-party action for release download
lukekim 8e70444
Address PR #2 review comments (round 4)
lukekim 1a196cf
Fix formatting (cargo fmt)
lukekim 780cefd
Fix CI failures and simplify setup action to use SMB URL syntax
lukekim 5094c75
Fix CI: install AWS CLI, harden setup action
lukekim 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,73 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
| CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
|
||
| jobs: | ||
| ci: | ||
| name: Format, lint, build, and test | ||
| # Self-hosted macOS runner required for CommonCrypto FFI and NAS access | ||
|
lukekim marked this conversation as resolved.
Outdated
|
||
| runs-on: spiceai-macos | ||
| permissions: | ||
| contents: read | ||
|
|
||
|
lukekim marked this conversation as resolved.
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| components: rustfmt,clippy | ||
|
|
||
| - name: Cache Rust build artifacts | ||
| uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Check formatting | ||
| run: cargo fmt --all --check | ||
|
|
||
| - name: Run cargo check | ||
| run: cargo check --locked --all-targets --all-features | ||
|
|
||
| - name: Run clippy | ||
| run: cargo clippy --locked --all-targets --all-features -- -D warnings -D clippy::all -D clippy::cargo -A clippy::cargo-common-metadata | ||
|
|
||
| - name: Check rustdoc | ||
| run: RUSTDOCFLAGS="-D warnings" cargo doc --locked --workspace --no-deps --document-private-items | ||
|
|
||
| - name: Build debug binary | ||
| run: cargo build --locked | ||
|
|
||
| - name: Run unit tests | ||
| run: cargo test --locked | ||
|
|
||
| - name: Run sccache integration test | ||
| # Skipped on fork PRs where the secret is unavailable | ||
| if: ${{ secrets.UNAS_SMB_PASS != '' }} | ||
| env: | ||
| SPICEIO_SMB_SERVER: ${{ vars.SPICEIO_SMB_SERVER || '192.168.3.148' }} | ||
| SPICEIO_SMB_USER: ${{ vars.SPICEIO_SMB_USER || 'runner' }} | ||
| SPICEIO_SMB_PASS: ${{ secrets.UNAS_SMB_PASS }} | ||
| SPICEIO_SMB_SHARE: ${{ vars.SPICEIO_SMB_SHARE || 'ai_platform_dev' }} | ||
| SPICEIO_BUCKET: ${{ vars.SPICEIO_BUCKET || 'spiceio' }} | ||
| SPICEIO_REGION: ${{ vars.SPICEIO_REGION || 'us-west-1' }} | ||
| run: ./scripts/test-sccache.sh | ||
|
lukekim marked this conversation as resolved.
lukekim marked this conversation as resolved.
lukekim marked this conversation as resolved.
|
||
|
|
||
| - name: Build release artifact | ||
| run: cargo build --release --locked --bin spiceio | ||
|
|
||
| - name: Upload release artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: spiceio-${{ runner.os }}-${{ runner.arch }} | ||
| path: target/release/spiceio | ||
| if-no-files-found: error | ||
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,49 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| release: | ||
| types: [created] | ||
|
lukekim marked this conversation as resolved.
|
||
|
|
||
|
lukekim marked this conversation as resolved.
lukekim marked this conversation as resolved.
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse | ||
| CARGO_NET_GIT_FETCH_WITH_CLI: true | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build release binary | ||
| # Self-hosted macOS runner required for CommonCrypto FFI | ||
| runs-on: spiceai-macos | ||
| permissions: | ||
| contents: write | ||
|
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Rust toolchain | ||
| uses: dtolnay/rust-toolchain@stable | ||
|
|
||
| - name: Cache Rust build artifacts | ||
| uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Build release binary | ||
| run: cargo build --release --locked --bin spiceio | ||
|
|
||
| - name: Package binary | ||
| run: | | ||
| cd target/release | ||
| tar czf spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz spiceio | ||
| shasum -a 256 spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz > spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz.sha256 | ||
|
|
||
| - name: Upload release assets | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| gh release upload "${{ github.event.release.tag_name }}" \ | ||
|
lukekim marked this conversation as resolved.
Outdated
|
||
| target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz \ | ||
| target/release/spiceio-${{ runner.os }}-${{ runner.arch }}.tar.gz.sha256 | ||
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.