From eed811747ce6f0db7f7877f30ecb3b4a43e247a4 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Wed, 3 Jun 2026 13:53:54 -0700 Subject: [PATCH 1/2] Migrate CI to GitHub Actions --- .cirrus.yml | 68 ---------------------- .github/workflows/ci.yml | 118 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+), 68 deletions(-) delete mode 100644 .cirrus.yml create mode 100644 .github/workflows/ci.yml diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index d711971..0000000 --- a/.cirrus.yml +++ /dev/null @@ -1,68 +0,0 @@ -use_compute_credits: true - -macos_instance: - image: ghcr.io/cirruslabs/macos-runner:tahoe - -env: - PATH: "$PATH:$HOME/.cargo/bin" - -task: - name: Lint - install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - rustfmt_script: cargo fmt --check - clippy_script: cargo clippy --all-targets --all-features -- -D warnings - -task: - alias: Test - matrix: - - name: Test on macOS Sequoia - macos_instance: - image: ghcr.io/cirruslabs/macos-runner:sequoia - - name: Test on macOS Tahoe - macos_instance: - image: ghcr.io/cirruslabs/macos-runner:tahoe - install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - test_script: cargo test - -task: - name: Release (Dry Run) - only_if: $CIRRUS_TAG == '' - depends_on: - - Lint - - Test - install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - install_script: brew install go - install_goreleaser_script: brew install --cask goreleaser/tap/goreleaser-pro - build_script: goreleaser build --snapshot - goreleaser_artifacts: - path: "dist/**" - -task: - name: Release - only_if: $CIRRUS_TAG != '' - depends_on: - - Lint - - Test - env: - GITHUB_TOKEN: ENCRYPTED[!98ace8259c6024da912c14d5a3c5c6aac186890a8d4819fad78f3e0c41a4e0cd3a2537dd6e91493952fb056fa434be7c!] - GORELEASER_KEY: ENCRYPTED[!9b80b6ef684ceaf40edd4c7af93014ee156c8aba7e6e5795f41c482729887b5c31f36b651491d790f1f668670888d9fd!] - SENTRY_ORG: cirrus-labs - SENTRY_PROJECT: persistent-workers - SENTRY_AUTH_TOKEN: ENCRYPTED[!c16a5cf7da5f856b4bc2f21fe8cb7aa2a6c981f851c094ed4d3025fd02ea59a58a86cee8b193a69a1fc20fa217e56ac3!] - install_rust_script: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - install_script: brew install go getsentry/tools/sentry-cli - install_goreleaser_script: brew install --cask goreleaser/tap/goreleaser-pro - release_script: goreleaser - upload_sentry_debug_files_script: - - cd target/aarch64-apple-darwin/release/ - # Generate and upload symbols - - dsymutil softnet - - sentry-cli debug-files upload -o $SENTRY_ORG -p $SENTRY_PROJECT softnet.dSYM/ - # Bundle and upload sources - - sentry-cli debug-files bundle-sources softnet.dSYM/ - - sentry-cli debug-files upload -o $SENTRY_ORG -p $SENTRY_PROJECT softnet.src.zip - create_sentry_release_script: - - export SENTRY_RELEASE="softnet@$CIRRUS_TAG" - - sentry-cli releases new $SENTRY_RELEASE - - sentry-cli releases set-commits $SENTRY_RELEASE --auto - - sentry-cli releases finalize $SENTRY_RELEASE diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..712d2fd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,118 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + tags: + - '*' + workflow_dispatch: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + name: Lint + runs-on: macos-15 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v5 + - name: Install Rust + run: rustup toolchain install nightly --profile minimal --component rustfmt --component clippy + - name: Check formatting + run: cargo fmt --check + - name: Clippy + run: cargo clippy --all-targets --all-features -- -D warnings + + test: + name: Test on ${{ matrix.name }} + runs-on: ${{ matrix.runner }} + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + include: + - name: macOS Sequoia + runner: macos-15 + - name: macOS Tahoe + runner: macos-26 + steps: + - uses: actions/checkout@v5 + - name: Install Rust + run: rustup toolchain install nightly --profile minimal + - name: Test + run: cargo test + + release_dry_run: + name: Release (Dry Run) + if: github.event_name != 'pull_request' && github.ref_type != 'tag' + needs: + - lint + - test + runs-on: macos-15 + timeout-minutes: 45 + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - name: Install Rust + run: rustup toolchain install nightly --profile minimal + - name: Install tools + run: | + brew install go + brew install --cask goreleaser/tap/goreleaser-pro + - name: Build snapshot + run: goreleaser build --snapshot + - name: Upload dist + uses: actions/upload-artifact@v4 + with: + name: dist-dry-run + path: dist/** + if-no-files-found: ignore + + release: + name: Release + if: github.ref_type == 'tag' + needs: + - lint + - test + runs-on: macos-15 + timeout-minutes: 45 + permissions: + contents: write + env: + GITHUB_TOKEN: ${{ github.token }} + GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: cirrus-labs + SENTRY_PROJECT: persistent-workers + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + - name: Install Rust + run: rustup toolchain install nightly --profile minimal + - name: Install tools + run: | + brew install go getsentry/tools/sentry-cli + brew install --cask goreleaser/tap/goreleaser-pro + - name: Release + run: goreleaser + - name: Upload Sentry debug files + run: | + cd target/aarch64-apple-darwin/release/ + dsymutil softnet + sentry-cli debug-files upload -o "$SENTRY_ORG" -p "$SENTRY_PROJECT" softnet.dSYM/ + sentry-cli debug-files bundle-sources softnet.dSYM/ + sentry-cli debug-files upload -o "$SENTRY_ORG" -p "$SENTRY_PROJECT" softnet.src.zip + - name: Create Sentry release + run: | + SENTRY_RELEASE="softnet@${GITHUB_REF_NAME}" + sentry-cli releases new "$SENTRY_RELEASE" + sentry-cli releases set-commits "$SENTRY_RELEASE" --auto + sentry-cli releases finalize "$SENTRY_RELEASE" From c9c967117011c3c176ea99cca531e1c0b395df3b Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Wed, 3 Jun 2026 14:43:41 -0700 Subject: [PATCH 2/2] Remove Sentry release steps --- .github/workflows/ci.yml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 712d2fd..8d9fa63 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,9 +88,6 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - SENTRY_ORG: cirrus-labs - SENTRY_PROJECT: persistent-workers steps: - uses: actions/checkout@v5 with: @@ -99,20 +96,7 @@ jobs: run: rustup toolchain install nightly --profile minimal - name: Install tools run: | - brew install go getsentry/tools/sentry-cli + brew install go brew install --cask goreleaser/tap/goreleaser-pro - name: Release run: goreleaser - - name: Upload Sentry debug files - run: | - cd target/aarch64-apple-darwin/release/ - dsymutil softnet - sentry-cli debug-files upload -o "$SENTRY_ORG" -p "$SENTRY_PROJECT" softnet.dSYM/ - sentry-cli debug-files bundle-sources softnet.dSYM/ - sentry-cli debug-files upload -o "$SENTRY_ORG" -p "$SENTRY_PROJECT" softnet.src.zip - - name: Create Sentry release - run: | - SENTRY_RELEASE="softnet@${GITHUB_REF_NAME}" - sentry-cli releases new "$SENTRY_RELEASE" - sentry-cli releases set-commits "$SENTRY_RELEASE" --auto - sentry-cli releases finalize "$SENTRY_RELEASE"