mirror of
https://github.com/cirruslabs/softnet.git
synced 2026-10-06 06:55:48 +02:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9c9671170 | ||
|
|
eed811747c |
-68
@@ -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
|
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
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 }}
|
||||||
|
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: Release
|
||||||
|
run: goreleaser
|
||||||
Reference in New Issue
Block a user