From 278402ee03907f28507f34792cf0afbfdc74b545 Mon Sep 17 00:00:00 2001 From: brennobemoura <37243584+brennobemoura@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:00:34 -0300 Subject: [PATCH 1/4] Replace swift-nio CI pipeline with request-dl/.github's swift-ci.yaml Drops the dependency on apple/swift-nio's reusable workflows (unit_tests, cxx_interop, static_sdk, release_builds) and the pull_request_semver_label_checker action, in favor of the org-standard generic Swift CI workflow. Coverage upload stays disabled. Apple platform tests stay disabled until the generated Xcode scheme is validated for this package. References the request-dl/.github branch that adds release-builds/static-sdk support natively (no apple/swift-nio dependency) until that branch merges to main. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/main.yml | 31 ---------- .github/workflows/pull_request.yml | 65 -------------------- .github/workflows/pull_request_label.yml | 17 ++++-- .github/workflows/swift-ci.yaml | 77 ++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 102 deletions(-) delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/pull_request.yml create mode 100644 .github/workflows/swift-ci.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index d2fdc3809..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Main - -permissions: - contents: read - -on: - push: - branches: [main] - schedule: - - cron: "0 8,20 * * *" - -jobs: - unit-tests: - name: Unit tests - uses: apple/swift-nio/.github/workflows/unit_tests.yml@main - with: - linux_5_10_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_6_0_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_6_1_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_6_2_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error" - linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" - - static-sdk: - name: Static SDK - # Workaround https://github.com/nektos/act/issues/1875 - uses: apple/swift-nio/.github/workflows/static_sdk.yml@main - - release-builds: - name: Release builds - uses: apple/swift-nio/.github/workflows/release_builds.yml@main diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index 3f946796e..000000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: PR - -permissions: - contents: read - -on: - pull_request: - types: [opened, reopened, synchronize] - -jobs: - soundness: - name: Soundness - uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.13 - with: - license_header_check_project_name: "AsyncHTTPClient" - unit-tests: - name: Unit tests - uses: apple/swift-nio/.github/workflows/unit_tests.yml@main - with: - linux_6_1_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_6_2_arguments_override: "--explicit-target-dependency-import-check error -Xswiftc -warnings-as-errors" - linux_nightly_next_arguments_override: "--explicit-target-dependency-import-check error" - linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error" - - cxx-interop: - name: Cxx interop - uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main - - static-sdk: - name: Static SDK - # Workaround https://github.com/nektos/act/issues/1875 - uses: apple/swift-nio/.github/workflows/static_sdk.yml@main - - release-builds: - name: Release builds - uses: apple/swift-nio/.github/workflows/release_builds.yml@main - - construct-linkage-test-matrix: - name: Construct linkage matrix - runs-on: ubuntu-latest - outputs: - linkage-test-matrix: '${{ steps.generate-matrix.outputs.linkage-test-matrix }}' - steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - persist-credentials: false - - id: generate-matrix - run: echo "linkage-test-matrix=$(curl -s https://raw.githubusercontent.com/apple/swift-nio/main/scripts/generate_matrix.sh | bash)" >> "$GITHUB_OUTPUT" - env: - MATRIX_LINUX_SETUP_COMMAND: apt-get update -y && apt-get install -yq jq && git config --global --add safe.directory /async-http-client - MATRIX_LINUX_COMMAND: ./scripts/run-linkage-test.sh - MATRIX_LINUX_5_10_ENABLED: false - MATRIX_LINUX_6_0_ENABLED: false - MATRIX_LINUX_6_1_ENABLED: false - MATRIX_LINUX_NIGHTLY_NEXT_ENABLED: false - MATRIX_LINUX_NIGHTLY_MAIN_ENABLED: false - - linkage-test: - name: Linkage test - needs: construct-linkage-test-matrix - uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main - with: - name: "Linkage test" - matrix_string: '${{ needs.construct-linkage-test-matrix.outputs.linkage-test-matrix }}' diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index ed8754bdd..a3798285a 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -1,7 +1,7 @@ name: PR label permissions: - contents: read + pull-requests: read on: pull_request: @@ -13,9 +13,14 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 1 steps: - - name: Checkout repository - uses: actions/checkout@v6 - with: - persist-credentials: false - name: Check for Semantic Version label - uses: apple/swift-nio/.github/actions/pull_request_semver_label_checker@main + env: + LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} + run: | + echo "Labels on this PR: $LABELS" + if echo "$LABELS" | grep -qE '⚠️ semver/major|🆕 semver/minor|🔨 semver/patch|semver/none'; then + echo "✅ Found a semver label" + else + echo "::error::PR must have one of the semver labels: ⚠️ semver/major, 🆕 semver/minor, 🔨 semver/patch, semver/none" + exit 1 + fi diff --git a/.github/workflows/swift-ci.yaml b/.github/workflows/swift-ci.yaml new file mode 100644 index 000000000..6b1bca26a --- /dev/null +++ b/.github/workflows/swift-ci.yaml @@ -0,0 +1,77 @@ +name: CI + +on: + push: + branches: [beta] + paths: + - 'Package.swift' + - 'Package@swift-*.swift' + - 'Sources/**' + - 'Tests/**' + - '.swift-format' + pull_request: + branches: [beta] + paths: + - 'Package.swift' + - 'Package@swift-*.swift' + - 'Sources/**' + - 'Tests/**' + - '.swift-format' + - '.github/workflows/swift-ci.yaml' + +# Cancel any in-progress or queued run for the same ref when a new run is +# triggered (e.g. new push), so stale xcodebuild/swift test processes don't +# keep running and don't sit blocking the queue. Pushes to beta use +# github.run_id so each run gets its own group instead of sharing one by +# ref — sharing by ref there can make cancel-in-progress try to cancel a +# run against itself while it's inside the reusable "Swift CI" workflow, +# which GitHub Actions reports as a concurrency deadlock. +concurrency: + group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/beta' && github.run_id || github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + ci: + name: "Swift CI" + # TODO: aponta para a branch de teste do request-dl/.github. Trocar para + # `@main` assim que essa branch for mergeada lá. + uses: request-dl/.github/.github/workflows/swift-ci.yaml@claude/proposal-release-builds-static-sdk-d53aed + with: + name: async-http-client + product-name: AsyncHTTPClient + swift-version: '6.2' + + # Step 1 – Format + enable-format: true + format-swift-version: '6.3' + + # Step 2 – Breaking Changes + enable-breaking-changes: true + skip-on-major-update: true + force-skip-breaking-changes: ${{ contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} + + # Step 3 – Apple + # Desligado até validar que o scheme gerado para este pacote resolve + # corretamente com `xcodebuild -scheme async-http-client` (nunca testado + # com este workflow genérico, ao contrário do request-dl-nio). + enable-apple-tests: false + package-name: "async-http-client" + + # Step 3 – Third Party (Linux) + enable-third-party-tests: true + + # Step 3 – Linkage Test (FoundationEssentials) + enable-linkage-test: true + + # Step 3 – Release Builds + enable-release-builds: true + release-builds-swift-versions: '["6.1", "6.2", "6.3"]' + + # Step 3 – Static SDK + # Seguro aqui: NIOTransportServices é condicionado a plataformas Apple + # em Package.swift, não é puxado incondicionalmente no Linux. + enable-static-sdk: true + + # Step 4 – Coverage Upload (desligado) + enable-coverage-upload: false + secrets: inherit From 2881289808201a64a9f87cd981c98a90e4fb4c37 Mon Sep 17 00:00:00 2001 From: brennobemoura <37243584+brennobemoura@users.noreply.github.com> Date: Wed, 26 Aug 2026 12:03:58 -0300 Subject: [PATCH 2/4] Drop the semver PR-label check workflow Not something we need to enforce on this fork. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/pull_request_label.yml | 26 ------------------------ 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/pull_request_label.yml diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml deleted file mode 100644 index a3798285a..000000000 --- a/.github/workflows/pull_request_label.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: PR label - -permissions: - pull-requests: read - -on: - pull_request: - types: [labeled, unlabeled, opened, reopened, synchronize] - -jobs: - semver-label-check: - name: Semantic version label check - runs-on: ubuntu-latest - timeout-minutes: 1 - steps: - - name: Check for Semantic Version label - env: - LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} - run: | - echo "Labels on this PR: $LABELS" - if echo "$LABELS" | grep -qE '⚠️ semver/major|🆕 semver/minor|🔨 semver/patch|semver/none'; then - echo "✅ Found a semver label" - else - echo "::error::PR must have one of the semver labels: ⚠️ semver/major, 🆕 semver/minor, 🔨 semver/patch, semver/none" - exit 1 - fi From acd6f56095c8655053c5f6b42f5a4fc9d0b0a7ef Mon Sep 17 00:00:00 2001 From: brennobemoura <37243584+brennobemoura@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:17:17 -0300 Subject: [PATCH 3/4] Remove semver-label release-notes categorization config Depended on the semver labels we just stopped enforcing. Co-Authored-By: Claude Sonnet 5 --- .github/release.yml | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml deleted file mode 100644 index e29eb8464..000000000 --- a/.github/release.yml +++ /dev/null @@ -1,14 +0,0 @@ -changelog: - categories: - - title: SemVer Major - labels: - - ⚠️ semver/major - - title: SemVer Minor - labels: - - 🆕 semver/minor - - title: SemVer Patch - labels: - - 🔨 semver/patch - - title: Other Changes - labels: - - semver/none From 63de125deb04f65de244a0844128095855208a85 Mon Sep 17 00:00:00 2001 From: brennobemoura <37243584+brennobemoura@users.noreply.github.com> Date: Wed, 26 Aug 2026 15:47:47 -0300 Subject: [PATCH 4/4] Enable Apple platform tests in Swift CI Linux/format/breaking-changes/release-builds/static-sdk are green on PR #2, worth checking whether the xcodebuild scheme resolves for this package too. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/swift-ci.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/swift-ci.yaml b/.github/workflows/swift-ci.yaml index 6b1bca26a..354f73204 100644 --- a/.github/workflows/swift-ci.yaml +++ b/.github/workflows/swift-ci.yaml @@ -51,10 +51,7 @@ jobs: force-skip-breaking-changes: ${{ contains(github.event.pull_request.labels.*.name, 'force-skip-ci') }} # Step 3 – Apple - # Desligado até validar que o scheme gerado para este pacote resolve - # corretamente com `xcodebuild -scheme async-http-client` (nunca testado - # com este workflow genérico, ao contrário do request-dl-nio). - enable-apple-tests: false + enable-apple-tests: true package-name: "async-http-client" # Step 3 – Third Party (Linux)