Files
swift-collections/.github/workflows/pull_request.yml
T
Karoy Lorentey ba06c4e0b6 [workflows] Update CI workflows
- Enable tests on FreeBSD
- Switch to symbolic Xcode version specifications that are based on the Swift version, not the precise Xcode version number. This lets us avoid having to laboriously update the specs every time Xcode gets a new minor release or beta — e.g., CI runners will pick up the latest Xcode they have installed that includes the specified Swift release.
- Stop excluding obsolete Swift versions that are no longer configured on runners.
- Add a job that tries to build the Xcode project at `Xcode/Collections.xcodeproj` under the latest Xcode on macOS.
- Add a job that runs tests with all unstable package traits enabled (`UnstableContainersPreview`, `UnstableHashedContainers`, `UnstableSortedCollections`.
- In exchange, change `hashed-container-tests` to only enable `UnstableHashedContainers`.
2026-08-18 18:16:37 -07:00

121 lines
4.9 KiB
YAML

name: Pull request
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
tests:
name: Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
enable_macos_checks: true
macos_xcode_versions: '["swift_6.1", "swift_6.2", "swift_6.3", "swift_6.4"]'
macos_exclude_xcode_versions: '[]'
linux_exclude_swift_versions: '[{"swift_version": "5.9"}, {"swift_version": "5.10"}]'
windows_exclude_swift_versions: '[{"swift_version": "5.9"}]'
enable_wasm_sdk_build: true
enable_android_sdk_build: true
enable_android_sdk_checks: true
enable_freebsd_checks: true
containers-tests:
name: Containers Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
linux_exclude_swift_versions: '[{"swift_version": "5.9"}, {"swift_version": "5.10"}, {"swift_version": "6.0"}, {"swift_version": "6.1"}, {"swift_version": "6.2"}, {"swift_version": "6.3"}, {"swift_version": "nightly-6.3"}]'
enable_macos_checks: false
enable_linux_checks: true
enable_windows_checks: false
swift_flags: --traits UnstableContainersPreview
hashed-containers-tests:
name: Hashed Containers Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
linux_exclude_swift_versions: '[{"swift_version": "5.8"}, {"swift_version": "5.9"}, {"swift_version": "5.10"}, {"swift_version": "6.0"}, {"swift_version": "6.1"}, {"swift_version": "6.2"}, {"swift_version": "6.3"}, {"swift_version": "nightly-6.3"}]'
windows_exclude_swift_versions: '[{"swift_version": "5.9"}, {"swift_version": "5.10"}, {"swift_version": "6.0"}, {"swift_version": "6.1"}, {"swift_version": "6.2"}]'
macos_exclude_xcode_versions: '[{"xcode_version": "swift_6.1"}, {"xcode_version": "swift_6.2"}]'
enable_macos_checks: false
enable_linux_checks: true
enable_windows_checks: false
swift_flags: --traits UnstableHashedContainers
all-traits-tests:
name: All Unstable Package Traits Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
linux_exclude_swift_versions: '[{"swift_version": "5.9"}, {"swift_version": "5.10"}, {"swift_version": "6.0"}, {"swift_version": "6.1"}, {"swift_version": "6.2"}, {"swift_version": "6.3"}, {"swift_version": "nightly-6.3"}]'
enable_macos_checks: false
enable_linux_checks: true
enable_windows_checks: false
swift_flags: --traits UnstableHashedContainers,UnstableContainersPreview,UnstableSortedCollections
embedded-swift:
name: Build with Embedded Swift
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
enable_linux_checks: false
enable_macos_checks: false
enable_windows_checks: false
enable_wasm_sdk_build: false
enable_embedded_wasm_sdk_build: true
swift_flags: --target Collections
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.13
with:
license_header_check_project_name: "Swift.org"
# https://github.com/apple/swift-collections/issues/428
python_lint_check_enabled: false
# https://github.com/apple/swift-collections/issues/429
docs_check_enabled: false
# https://github.com/apple/swift-collections/issues/430
shell_check_enabled: false
# https://github.com/apple/swift-collections/issues/431
format_check_enabled: false
# https://github.com/apple/swift-collections/issues/435
api_breakage_check_enabled: false
cmake-build:
name: CMake Build
runs-on: ubuntu-latest
container:
image: swiftlang/swift:nightly-main-jammy
steps:
- name: Checkout repo
uses: actions/checkout@v7
- name: Install apt dependencies
run: apt-get -qq update && apt-get -qq -y install curl ninja-build
- name: Install CMake 3.30.2
run: |
ARCH=`uname -m`
curl -sL https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-$ARCH.tar.gz -O
tar xzf cmake-3.30.2-linux-$ARCH.tar.gz
export PATH="`pwd`/cmake-3.30.2-linux-$ARCH/bin:$PATH"
echo "PATH=$PATH" >> $GITHUB_ENV
cmake --version
- name: Configure CMake
run: cmake -G Ninja -S . -B .cmake-build
- name: Build
run: cmake --build .cmake-build
xcode-build:
name: Xcode Project Build
runs-on: [self-hosted, macos, "tahoe", "ARM64"]
steps:
- name: Checkout repo
uses: actions/checkout@v7
- name: Select Xcode
run: echo "DEVELOPER_DIR=/Applications/Xcode_swift_6.4.app/Contents/Developer" >> $GITHUB_ENV
- name: Xcode version
run: xcrun xcodebuild -version
- name: Swift version
run: xcrun swift --version
- name: Build
run: xcrun xcodebuild -project Xcode/Collections.xcodeproj -scheme Collections