Skip to content

Fix SwiftPM’s existing .exact(...) requirement to match the complete parsed version identifier, including build metadata. #2280

Fix SwiftPM’s existing .exact(...) requirement to match the complete parsed version identifier, including build metadata.

Fix SwiftPM’s existing .exact(...) requirement to match the complete parsed version identifier, including build metadata. #2280

Workflow file for this run

name: Pull request
permissions:
contents: read
on:
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
needs: [soundness]
strategy:
fail-fast: false
name: Build
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
enable_cross_pr_testing: true
linux_os_versions: '["amazonlinux2023", "bookworm", "noble", "jammy", "rhel-ubi9"]'
linux_swift_versions: '["nightly-main", "nightly-6.4.x"]'
linux_pre_build_command: ./.github/scripts/prebuild.sh
linux_build_command: 'swift run swift-build --build-tests'
windows_build_timeout: 180
windows_swift_versions: '["nightly-main", "nightly-6.4.x",]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_build_command: 'Invoke-Program swift run -Xlinker /ignore:4217 --configuration release swift-build --build-tests --scratch-path .tests'
# enable_android_sdk_build: true
# android_sdk_build_command: "swift run swift-build --build-tests --build-system swiftbuild"
# android_ndk_versions: '["r27d", "r29"]'
enable_windows_checks: true
enable_macos_checks: true
macos_exclude_xcode_versions: "[{\"xcode_version\": \"16.4\"}]"
macos_build_command: 'swift run swift-build --build-tests'
enable_ios_checks: false
# ios_build_command: 'swift run swift-build --build-tests --sdk \"$(xcrun --sdk iphoneos --show-sdk-path)\" --triple arm64-apple-ios'
test-example-package-registry:
strategy:
fail-fast: false
name: Build and Test Example Package Registry
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
with:
enable_cross_pr_testing: false
enable_linux_checks: true
linux_swift_versions: '["nightly-main", "nightly-6.4.x"]'
linux_build_command: 'set -x; cd Examples/package-registry && swift test --parallel; set +x'
enable_windows_checks: false # https://github.com/swiftlang/swift-package-manager/issues/10326
windows_swift_versions: '["nightly-main"]'
# windows_swift_versions: '["nightly-main", "nightly-6.4.x"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1 -InstallZlib -SkipAndroid'
windows_build_timeout: 180
windows_build_command: 'cd Examples\package-registry; Invoke-program swift test --parallel'
enable_macos_checks: true
macos_xcode_versions: "['27.b2']"
macos_build_command: 'set -x; cd Examples/package-registry && xcrun swift test --parallel; set +x'
enable_ios_checks: false
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@0.0.13
with:
license_header_check_project_name: "Swift"
license_header_check_enabled: true
unacceptable_language_check_enabled: true
api_breakage_check_enabled: false
format_check_enabled: false
shell_check_enabled: false
docs_check_enabled: true
docs_check_analyze: false
docs_check_targets: "PackageManagerDocs"
docs_check_macos_enabled: false
broken_symlink_check_enabled: true
python_lint_check_enabled: true
yamllint_check_enabled: true
integration-tests:
name: Integration Tests
needs: [soundness]
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.13
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: ./.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 --parallel --experimental-xunit-message-failure --xunit-output wasm-xunit.xml --filter WebAssemblyIntegrationTests #"
enable_linux_static_sdk_build: true
linux_static_sdk_versions: '["nightly-main"]'
linux_static_sdk_pre_build_command: ./.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 --parallel --experimental-xunit-message-failure --xunit-output static-linux-xunit.xml --filter StaticLinuxIntegrationTests #"
enable_android_sdk_build: true
android_sdk_build_command: "swift test --parallel --experimental-xunit-message-failure --xunit-output android-xunit.xml --filter AndroidSDKIntegrationTests #"
required:
name: Required
runs-on: ubuntu-latest
needs:
- build
- test-example-package-registry
- soundness
- integration-tests
if: always() # Runs even if previous jobs fail so it can evaluate them
steps:
- name: Install required tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends coreutils jq
- name: Check upstream job statuses
env:
NEEDS_JSON: ${{ toJSON(needs) }}
run: |
failed=$(printf '%s' "$NEEDS_JSON" | jq -r 'to_entries | map(select(.value.result != "success")) | .[] | "\(.key): \(.value.result)"')
if [ -n "$failed" ]; then
echo "The following required jobs did not succeed:"
printf '%s\n' "$failed"
exit 1
fi
echo "All required jobs passed successfully!"