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 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 deleted file mode 100644 index ed8754bdd..000000000 --- a/.github/workflows/pull_request_label.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: PR label - -permissions: - contents: 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: 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 diff --git a/.github/workflows/swift-ci.yaml b/.github/workflows/swift-ci.yaml new file mode 100644 index 000000000..354f73204 --- /dev/null +++ b/.github/workflows/swift-ci.yaml @@ -0,0 +1,74 @@ +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 + enable-apple-tests: true + 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