Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/scripts/prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,6 @@ elif command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy
if [[ "$INSTALL_CMAKE" == "1" ]] ; then
apt-get install -y cmake ninja-build
fi

# Android NDK
dpkg_architecture="$(dpkg --print-architecture)"
if [[ "$SKIP_ANDROID" != "1" ]] && [[ "$dpkg_architecture" == amd64 ]] ; then
eval "$(cat /etc/os-release)"
case "$VERSION_CODENAME" in
bookworm|jammy)
: # Not available
;;
noble)
apt-get install -y google-android-ndk-r26c-installer
;;
*)
echo "Unable to fetch Android NDK for unknown Linux distribution: $VERSION_CODENAME" >&2
exit 1
esac
else
echo "Skipping Android NDK installation on $dpkg_architecture" >&2
fi
elif command -v dnf >/dev/null 2>&1 ; then # rhel-ubi9
dnf update -y

Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,24 @@ jobs:
tests:
name: Test
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
needs: [soundness]
with:
linux_os_versions: '["amazonlinux2", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_swift_versions: '["nightly-main"]'
linux_pre_build_command: ./.github/scripts/prebuild.sh
linux_build_command: 'swift build'
windows_swift_versions: '["nightly-main"]'
linux_build_command: 'swift build --build-tests'
linux_swift_versions: '["nightly-main"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_build_command: 'Invoke-Program swift build'
windows_swift_versions: '["nightly-main"]'
windows_build_command: 'Invoke-Program swift build --build-tests'
enable_android_sdk_build: true
android_sdk_build_command: "swift build --build-tests"
android_ndk_versions: '["r27d", "r29"]'
android_sdk_triples: '["aarch64-unknown-linux-android28"]'
enable_ios_checks: true
enable_macos_checks: true
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.3\"}, {\"xcode_version\": \"16.4\"}]"
macos_build_command: 'swift build'
macos_pre_build_command: ./.github/scripts/prebuild.sh
macos_build_command: 'swift build --build-tests'

soundness:
name: Soundness
Expand Down
12 changes: 10 additions & 2 deletions Sources/Basics/Concurrency/AsyncProcess.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np_supported

@_implementationOnly
import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np

@_implementationOnly
import func TSCclibc.SPM_posix_spawnp
#else
private import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np_supported
private import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np
package import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np_supported
package import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np
package import func TSCclibc.SPM_posix_spawnp
#endif // #if USE_IMPL_ONLY_IMPORTS
#endif

Expand Down Expand Up @@ -687,7 +691,11 @@ package final class AsyncProcess {
}
let argv = CStringArray(resolvedArgs)
let env = CStringArray(environment.map { "\($0.0)=\($0.1)" })
#if canImport(Darwin)
let rv = posix_spawnp(&self.processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray)
#else
let rv = SPM_posix_spawnp(&self.processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray)
#endif

guard rv == 0 else {
throw SystemError.posix_spawn(rv, self.arguments)
Expand Down
2 changes: 2 additions & 0 deletions Tests/FunctionalTests/LibraryEvolutionXCFLinuxTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ private struct SwiftPMTests {
let arch = "aarch64"
#elseif arch(x86_64)
let arch = "x86_64"
#else
preconditionFailure("Unsupported platform or host arch for test")
#endif

let platform = "linux"
Expand Down
2 changes: 1 addition & 1 deletion Tests/IntegrationTests/SwiftPMTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ private struct SwiftPMTests {
#elseif arch(arm64)
hostArch = "arm64"
#else
precondition("Unsupported platform or host arch for test")
preconditionFailure("Unsupported platform or host arch for test")
#endif
switch buildSystem {
case .native:
Expand Down
Loading