Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions .cirrus.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
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
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
tags:
- "*"
workflow_dispatch:

permissions:
contents: write

jobs:
release:
name: ${{ github.ref_type == 'tag' && 'Release' || 'Release (Dry Run)' }}
runs-on: ghcr.io/cirruslabs/macos-runner:tahoe
timeout-minutes: 60
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- 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
if: github.ref_type == 'tag'
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean
- name: Release dry run
if: github.ref_type != 'tag'
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --skip=publish --snapshot --clean
- name: Upload dry-run artifacts
if: github.ref_type != 'tag'
uses: actions/upload-artifact@v6
with:
name: softnet-snapshot
path: dist/**
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ brews:
owner: cirruslabs
name: homebrew-cli
caveats: See the Github repository for more information
homepage: https://github.com/cirruslabs/softnet
homepage: https://github.com/openai/softnet
description: Software networking with isolation for Tart
skip_upload: auto
custom_block: |
Expand Down
Loading