-
Notifications
You must be signed in to change notification settings - Fork 25
Migrate CI from Cirrus CI to GitHub Actions #167
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
fkorotkov-oai
merged 3 commits into
main
from
dev/fkorotkov/migrate-ci-to-github-actions
Jul 7, 2026
Merged
Changes from all commits
Commits
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 was deleted.
Oops, something went wrong.
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,51 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| merge_group: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ghcr.io/cirruslabs/macos-runner:tahoe | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | ||
| - name: Install lint components | ||
| run: rustup component add clippy rustfmt | ||
| - name: Check formatting | ||
| run: cargo fmt --check | ||
| - name: Run Clippy | ||
| run: cargo clippy --all-targets --all-features -- -D warnings | ||
|
|
||
| test: | ||
| name: Test on macOS ${{ matrix.macos }} | ||
| runs-on: ghcr.io/cirruslabs/macos-runner:${{ matrix.runner }} | ||
| timeout-minutes: 30 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - macos: Sequoia | ||
| runner: sequoia | ||
| - macos: Tahoe | ||
| runner: tahoe | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | ||
| - name: Run tests | ||
| run: cargo test |
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,84 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "*" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Release | ||
| if: github.event_name == 'push' && github.ref_type == 'tag' | ||
| runs-on: ghcr.io/cirruslabs/macos-runner:tahoe | ||
| environment: publish | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | ||
| - name: Install release targets | ||
| run: rustup target add aarch64-apple-darwin x86_64-apple-darwin | ||
| - name: Create release app token for this repo | ||
| id: app-token | ||
| uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | ||
| with: | ||
| app-id: ${{ secrets.RELEASE_APP_ID }} | ||
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | ||
| permission-contents: write | ||
| - name: Create release app token for homebrew-tools | ||
| id: tap-token | ||
| uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1 | ||
| with: | ||
| app-id: ${{ secrets.RELEASE_APP_ID }} | ||
| private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }} | ||
| owner: openai | ||
| repositories: homebrew-tools | ||
| permission-contents: write | ||
| permission-pull-requests: write | ||
| - name: Release | ||
| uses: goreleaser/goreleaser-action@v7 | ||
| with: | ||
| distribution: goreleaser-pro | ||
| version: "~> v2" | ||
| args: release --clean | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | ||
| HOMEBREW_TAP_GITHUB_TOKEN: ${{ steps.tap-token.outputs.token }} | ||
| GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} | ||
|
|
||
| snapshot: | ||
| name: Release (Dry Run) | ||
| if: github.event_name == 'workflow_dispatch' | ||
| runs-on: ghcr.io/cirruslabs/macos-runner:tahoe | ||
| timeout-minutes: 60 | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
| - name: Install Rust | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal | ||
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | ||
| - name: Install release targets | ||
| run: rustup target add aarch64-apple-darwin x86_64-apple-darwin | ||
| - name: Release dry run | ||
| uses: goreleaser/goreleaser-action@v7 | ||
| with: | ||
| distribution: goreleaser-pro | ||
| version: "~> v2" | ||
| args: release --skip=publish --snapshot --clean | ||
| - name: Upload dry-run artifacts | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: softnet-snapshot | ||
| path: dist/** | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this tag workflow reaches
goreleaser release --clean, it publishes without any preceding lint or test job; the new CI workflow only runs on PRs, merge groups, manual runs, and pushes to themainbranch, so tag pushes do not exercise it. The removed Cirrus release task depended on bothLintandTest, so tagging a broken commit can now publish artifacts before formatting, clippy, or the macOS test matrix has passed; add equivalent checks to this workflow or otherwise make tag releases wait for a tag-triggered CI run.Useful? React with 👍 / 👎.