From d71f9f10cc1e7017d0b987671763e63031d14190 Mon Sep 17 00:00:00 2001 From: Mark Xue Date: Mon, 10 Aug 2026 15:22:52 -0700 Subject: [PATCH 1/3] Name the CI workflow for its platform and add a status badge GitHub's workflow badges are workflow-scoped, so a badge can only be as specific as the workflow it points at. Naming this one Apple lets the README state which platform is actually covered, and leaves room for ci-linux.yml / ci-android.yml to land beside it. --- .changeset/silly-cows-sing.md | 5 +++++ .github/workflows/{ci.yml => ci-apple.yml} | 2 +- README.md | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/silly-cows-sing.md rename .github/workflows/{ci.yml => ci-apple.yml} (98%) diff --git a/.changeset/silly-cows-sing.md b/.changeset/silly-cows-sing.md new file mode 100644 index 0000000..dd2dda1 --- /dev/null +++ b/.changeset/silly-cows-sing.md @@ -0,0 +1,5 @@ +--- +--- + +CI and README only — renames the CI workflow to name the platform it +covers and adds a status badge. No package change, so no release. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-apple.yml similarity index 98% rename from .github/workflows/ci.yml rename to .github/workflows/ci-apple.yml index 4b4d92a..4543ab7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-apple.yml @@ -1,4 +1,4 @@ -name: CI +name: Apple on: push: diff --git a/README.md b/README.md index 4c04dad..4914fb7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Apple](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-apple.yml/badge.svg)](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-apple.yml) + This library provides types corresponding to [atproto](https://atproto.com) type definitions. @@ -29,4 +31,4 @@ formatter and linter: swift format . -ri && swift format lint . -r ``` -We also use the [periphery static analyzer](https://github.com/peripheryapp/periphery) and have a configured `periphery.yml` +We also use the [periphery static analyzer](https://github.com/peripheryapp/periphery) and have a configured `periphery.yml` \ No newline at end of file From 8eea6ecebbd4b12287d377d374ef97035a6589a9 Mon Sep 17 00:00:00 2001 From: Mark Xue Date: Mon, 17 Aug 2026 16:30:14 -0700 Subject: [PATCH 2/3] Add the Linux and Android CI legs An Apple-only badge says nothing about the platforms the package is being ported to. Matches GermConvenience, whose three legs are green on main. Co-Authored-By: Claude Opus 5 --- .changeset/silly-cows-sing.md | 5 +++-- .github/workflows/ci-android.yml | 30 ++++++++++++++++++++++++++ .github/workflows/ci-linux.yml | 36 ++++++++++++++++++++++++++++++++ README.md | 2 ++ 4 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci-android.yml create mode 100644 .github/workflows/ci-linux.yml diff --git a/.changeset/silly-cows-sing.md b/.changeset/silly-cows-sing.md index dd2dda1..fdbcaf3 100644 --- a/.changeset/silly-cows-sing.md +++ b/.changeset/silly-cows-sing.md @@ -1,5 +1,6 @@ --- --- -CI and README only — renames the CI workflow to name the platform it -covers and adds a status badge. No package change, so no release. +CI and README only — one workflow per platform, each named for the platform it +covers, and a badge row that says which three CI actually proves. No package +change, so no release. diff --git a/.github/workflows/ci-android.yml b/.github/workflows/ci-android.yml new file mode 100644 index 0000000..86554ec --- /dev/null +++ b/.github/workflows/ci-android.yml @@ -0,0 +1,30 @@ +name: Android + +on: + push: + # branches: + # - main + paths-ignore: + - "README.md" + - "CODE_OF_CONDUCT.md" + - ".editorconfig" + - ".spi.yml" + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + linux-android: + name: Test Android + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - name: "Test Swift Package on Android" + uses: skiptools/swift-android-action@v2 + with: + swift-version: "6.3" diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml new file mode 100644 index 0000000..de1d610 --- /dev/null +++ b/.github/workflows/ci-linux.yml @@ -0,0 +1,36 @@ +name: Linux + +on: + push: + # branches: + # - main + paths-ignore: + - "README.md" + - "CODE_OF_CONDUCT.md" + - ".editorconfig" + - ".spi.yml" + pull_request: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + linux_test: + name: Test Linux + runs-on: ubuntu-latest + container: + image: swift:${{matrix.swift-version}} + timeout-minutes: 30 + strategy: + matrix: + swift-version: + - "latest" + steps: + - name: Checkout + uses: actions/checkout@v6 + - run: swift --version + - name: Test + run: swift test diff --git a/README.md b/README.md index 4914fb7..40a523e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ [![Apple](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-apple.yml/badge.svg)](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-apple.yml) +[![Linux](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-linux.yml/badge.svg)](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-linux.yml) +[![Android](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-android.yml/badge.svg)](https://github.com/germ-network/AtprotoTypes/actions/workflows/ci-android.yml) This library provides types corresponding to [atproto](https://atproto.com) type definitions. From 093dfc70a2cf19795447b78dd65e0792548ca76b Mon Sep 17 00:00:00 2001 From: Mark Xue Date: Mon, 17 Aug 2026 17:06:41 -0700 Subject: [PATCH 3/3] Run push CI only on main and pin the Linux toolchain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Push and pull_request events land in different concurrency groups, so an open PR ran every leg twice per commit. Filtering push to main leaves one run per PR commit plus the badge run on merge. Linux pins swift:6.2 — the package's declared toolchain floor — instead of floating on latest. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci-android.yml | 6 ++---- .github/workflows/ci-apple.yml | 6 ++---- .github/workflows/ci-linux.yml | 8 +++----- README.md | 2 +- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci-android.yml b/.github/workflows/ci-android.yml index 86554ec..9ca6ea8 100644 --- a/.github/workflows/ci-android.yml +++ b/.github/workflows/ci-android.yml @@ -2,16 +2,14 @@ name: Android on: push: - # branches: - # - main + branches: + - main paths-ignore: - "README.md" - "CODE_OF_CONDUCT.md" - ".editorconfig" - ".spi.yml" pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/ci-apple.yml b/.github/workflows/ci-apple.yml index 4543ab7..5bfbf21 100644 --- a/.github/workflows/ci-apple.yml +++ b/.github/workflows/ci-apple.yml @@ -2,16 +2,14 @@ name: Apple on: push: - # branches: - # - main + branches: + - main paths-ignore: - 'README.md' - 'CODE_OF_CONDUCT.md' - '.editorconfig' - '.spi.yml' pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index de1d610..eb96101 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -2,16 +2,14 @@ name: Linux on: push: - # branches: - # - main + branches: + - main paths-ignore: - "README.md" - "CODE_OF_CONDUCT.md" - ".editorconfig" - ".spi.yml" pull_request: - branches: - - main concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} @@ -27,7 +25,7 @@ jobs: strategy: matrix: swift-version: - - "latest" + - "6.2" steps: - name: Checkout uses: actions/checkout@v6 diff --git a/README.md b/README.md index 40a523e..e6b99d2 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,4 @@ formatter and linter: swift format . -ri && swift format lint . -r ``` -We also use the [periphery static analyzer](https://github.com/peripheryapp/periphery) and have a configured `periphery.yml` \ No newline at end of file +We also use the [periphery static analyzer](https://github.com/peripheryapp/periphery) and have a configured `periphery.yml`