mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Add support for macOS CI runner pools ### Motivation: With new runners coming online we are separating the runners into pools. * "nightly" runners are to be targeted for asynchronous work which users aren't waiting on such as overnight work. * "general" runners can be used for either synchronoous or asynchronous work. * At the moment all runers are "general" runners, a subset are "nightly" runners. The aim here is to prioritize work which users are waiting for such as on PRs. Asynchronous work prioritizing the "nightly" runners will likely end up queuing for the contended runners but synchronous work will claim any available node. ### Modifications: * Add a `runner_pool` input for the macOS workflow * Default the `runner_pool` to `nightly` since the vast majority of existing workflows are specifying asynchronous work. * Specify the runner pool in NIO's use of macOS CI. ### Result: Support for runner pools. An example of this in action: https://github.com/apple/swift-nio/actions/runs/14188573697/job/39748250001
75 lines
2.9 KiB
YAML
75 lines
2.9 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "0 8,20 * * *"
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Unit tests
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
|
|
with:
|
|
linux_5_9_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_5_10_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_6_0_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_nightly_6_1_arguments_override: "-Xswiftc -warnings-as-errors --explicit-target-dependency-import-check error"
|
|
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
|
|
|
|
cxx-interop:
|
|
name: Cxx interop
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/cxx_interop.yml@main
|
|
|
|
benchmarks:
|
|
name: Benchmarks
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/benchmarks.yml@main
|
|
with:
|
|
benchmark_package_path: "Benchmarks"
|
|
|
|
construct-integration-test-matrix:
|
|
name: Construct integration test matrix
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
integration-test-matrix: '${{ steps.generate-matrix.outputs.integration-test-matrix }}'
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
- id: generate-matrix
|
|
run: echo "integration-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 -q && apt-get install -y -q lsof dnsutils netcat-openbsd net-tools curl jq"
|
|
MATRIX_LINUX_COMMAND: "./scripts/integration_tests.sh"
|
|
|
|
integration-tests:
|
|
name: Integration tests
|
|
needs: construct-integration-test-matrix
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/swift_test_matrix.yml@main
|
|
with:
|
|
name: "Integration tests"
|
|
matrix_string: '${{ needs.construct-integration-test-matrix.outputs.integration-test-matrix }}'
|
|
|
|
static-sdk:
|
|
name: Static SDK
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/static_sdk.yml@main
|
|
|
|
macos-tests:
|
|
name: macOS tests
|
|
# Workaround https://github.com/nektos/act/issues/1875
|
|
uses: apple/swift-nio/.github/workflows/macos_tests.yml@main
|
|
with:
|
|
runner_pool: nightly
|
|
build_scheme: swift-nio-Package
|
|
macos_xcode_test_enabled: false # Disabled because of an issue
|
|
ios_xcode_test_enabled: true
|
|
watchos_xcode_test_enabled: true
|
|
tvos_xcode_test_enabled: true
|
|
visionos_xcode_test_enabled: true
|