-
Notifications
You must be signed in to change notification settings - Fork 187
132 lines (126 loc) · 6.88 KB
/
Copy pathpull_request.yml
File metadata and controls
132 lines (126 loc) · 6.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: Pull request
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
needs: [soundness, space-format-check]
with:
enable_cross_pr_testing: true
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_pre_build_command: ./.github/scripts/prebuild.sh
linux_build_command: 'swift test --no-parallel'
linux_swift_versions: '["nightly-main", "nightly-6.3"]'
linux_host_archs: '["x86_64", "aarch64"]'
freebsd_pre_build_command: ./.github/scripts/prebuild.sh
freebsd_build_command: 'swift test --no-parallel'
enable_freebsd_checks: true
windows_build_timeout: 180
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_swift_versions: '["nightly-main", "nightly-6.3"]'
windows_build_command: 'Invoke-Program swift test --no-parallel'
enable_linux_static_sdk_build: true
enable_android_sdk_build: true
android_sdk_build_command: "swift build --build-tests"
android_ndk_versions: '["r27d", "r29"]'
linux_static_sdk_build_command: SWIFTBUILD_STATIC_LINK=1 LLBUILD_STATIC_LINK=1 swift build
enable_ios_checks: true
enable_macos_checks: true
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.3\"}, {\"xcode_version\": \"16.4\"}]"
macos_pre_build_command: ./.github/scripts/prebuild.sh
macos_build_command:
swift test &&
/usr/bin/xcrun xcodebuild -workspace . -scheme SwiftBuild-Package -destination generic/platform=iOS
tests_without_docker:
name: Test without Docker
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
needs: [soundness, space-format-check]
with:
enable_linux_checks: false
enable_windows_docker: false
windows_build_timeout: 180
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_swift_versions: '["nightly-main", "nightly-6.3"]'
windows_build_command: 'Invoke-Program swift test --no-parallel'
windows_os_versions: '["windows-2022", "windows-11-arm"]'
cmake-smoke-test:
name: cmake-smoke-test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
needs: [soundness, space-format-check]
with:
linux_os_versions: '["noble"]'
linux_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh
linux_build_command: 'swift package -Xbuild-tools-swiftc -DUSE_PROCESS_SPAWNING_WORKAROUND cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`'
linux_swift_versions: '["nightly-main"]'
linux_host_archs: '["x86_64", "aarch64"]'
enable_macos_checks: true
macos_xcode_versions: '["26.4"]'
macos_pre_build_command: SKIP_ANDROID=1 INSTALL_CMAKE=1 ./.github/scripts/prebuild.sh
macos_build_command: 'export PATH=$PATH:$RUNNER_TOOL_CACHE && swift package cmake-smoke-test --disable-sandbox --cmake-path `which cmake` --ninja-path `which ninja` --extra-cmake-arg -DCMAKE_C_COMPILER=`which clang` --extra-cmake-arg -DCMAKE_CXX_COMPILER=`which clang++` --extra-cmake-arg -DCMAKE_Swift_COMPILER=`which swiftc`'
windows_build_timeout: 180
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1 -SkipAndroid -InstallCMake'
windows_swift_versions: '["nightly-main"]'
windows_build_command: 'Invoke-Program swift package cmake-smoke-test --disable-sandbox --cmake-path (Get-Command cmake).Path --ninja-path (Get-Command ninja).Path --extra-cmake-arg "-DCMAKE_C_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_CXX_COMPILER=$((Get-Command clang).Path)" --extra-cmake-arg "-DCMAKE_Swift_COMPILER=$((Get-Command swiftc).Path)" --extra-cmake-arg "-DCMAKE_STATIC_LIBRARY_PREFIX_Swift=lib" --extra-cmake-arg "-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL"'
wasm-integration-tests:
name: Wasm Integration Tests
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
needs: [soundness, space-format-check]
with:
enable_linux_checks: false
enable_windows_checks: false
enable_macos_checks: false
enable_wasm_sdk_build: true
wasm_sdk_versions: '["nightly-main"]'
wasm_sdk_pre_build_command: SKIP_ANDROID=1 ./.github/scripts/prebuild.sh
# This is a hack - replace the build command with a test command and drop the --swift-sdk arg the workflow appends.
wasm_sdk_build_command: "swift test --filter WebAssemblyIntegrationTests #"
static-linux-sdk-integration-tests:
name: Static Linux SDK Integration Tests
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
needs: [soundness, space-format-check]
with:
enable_linux_checks: false
enable_windows_checks: false
enable_macos_checks: false
enable_linux_static_sdk_build: true
linux_static_sdk_versions: '["nightly-main"]'
linux_static_sdk_pre_build_command: SKIP_ANDROID=1 ./.github/scripts/prebuild.sh
# This is a hack - replace the build command with a test command and drop the --swift-sdk arg the workflow appends.
linux_static_sdk_build_command: "swift test --filter StaticLinuxSDKIntegrationTests #"
swiftpm-self-hosted-tests:
name: Test SwiftPM
needs: [soundness, space-format-check]
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.10
with:
linux_os_versions: '["jammy"]'
linux_swift_versions: '["nightly-main"]'
linux_pre_build_command: ./.github/scripts/prebuild.sh && ./.github/scripts/clone-swiftpm-deps.sh "${{ github.base_ref }}"
linux_build_command: 'SWIFTCI_USE_LOCAL_DEPS=1 swift test --package-path ../swiftpm'
enable_macos_checks: true
macos_xcode_versions: '["26.4"]'
macos_pre_build_command: ./.github/scripts/prebuild.sh && ./.github/scripts/clone-swiftpm-deps.sh "${{ github.base_ref }}"
macos_build_command: 'SWIFTCI_USE_LOCAL_DEPS=1 swift test --package-path ../swiftpm --skip testSDKTracking'
enable_windows_checks: false
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.10
with:
license_header_check_project_name: "Swift"
api_breakage_check_enabled: false
format_check_enabled: false
space-format-check:
name: Space format check
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run space format check
run: cat .github/scripts/format-check.sh | bash