mirror of
https://github.com/swift-server/async-http-client.git
synced 2026-05-03 07:32:29 +00:00
c5784ca815
Replaces all the foundation imports. One issue is that `HTTPClient.init?(httpsURLWithSocketPath socketPath: String, uri: String = "/")` uses `addingPercentEncoding()` from Foundation. So instead, we use a pure Swift impl. that does the same. We also need to disable default traits from `swift-configuration` to prevent linking Foundation, because the `JSON` trait does that. This also adds a linkage test to prevent regressions to CI.
70 lines
2.9 KiB
YAML
70 lines
2.9 KiB
YAML
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.7
|
|
with:
|
|
license_header_check_project_name: "AsyncHTTPClient"
|
|
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"
|
|
|
|
cxx-interop:
|
|
name: Cxx interop
|
|
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
|
|
with:
|
|
linux_5_9_enabled: false
|
|
|
|
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 }}'
|