Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .github/scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
set -e

while true ; do
swift test -vv || (sleep 10 && ls -l ~/Library/Logs/DiagnosticReports/)
done
67 changes: 3 additions & 64 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,71 +15,10 @@ jobs:
tests:
name: Test
uses: swiftlang/github-workflows/.github/workflows/[email protected]
needs: [soundness, space-format-check]
with:
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.2"]'
linux_host_archs: '["x86_64", "aarch64"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_swift_versions: '["nightly-main", "nightly-6.2"]'
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_linux_checks: false
enable_windows_checks: false
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/[email protected]
needs: [soundness, space-format-check]
with:
enable_linux_checks: false
enable_windows_docker: false
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_swift_versions: '["nightly-main", "nightly-6.2"]'
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/[email protected]
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.0"]'
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_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"'

soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/[email protected]
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
macos_build_command: ./.github/scripts/test.sh
Loading