Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f1b992b
Support cross-PR testing for Swift packages (#52)
ahoppen Sep 1, 2025
7c2d479
Update the checks in the soundness.yml to use Swift 6.1 Docker images…
shahmishal Sep 10, 2025
a28eb2c
Add support for Xcode 26 beta 6 (#157)
shahmishal Sep 10, 2025
271c5b7
Support en dash character within copyright year range in license head…
stmontgomery Sep 11, 2025
46c9211
Add 6.2 install script for windows (#160)
award999 Sep 17, 2025
c8cd040
Add a call to `clang --version` in the PR worfklow. (#161)
grynspan Sep 17, 2025
eb4096b
Add Swift 6.2 version to swift package testing (#159)
shahmishal Sep 17, 2025
88afc78
improve “linux_static_sdk” workflow (#162)
glessard Sep 18, 2025
a255edc
Drop Xcode 16.2 and 26.b6. Add Xcode 26.0 (#163)
shahmishal Sep 20, 2025
22efd84
Update container images for soundness to 6.2 (#164)
FranzBusch Sep 22, 2025
1169be7
set explicit permissions for GitHub workflows - soundness.yml (#168)
incertum Oct 1, 2025
20d5c09
set explicit permissions for GitHub workflows - all remaining workflo…
incertum Oct 4, 2025
6e10732
Increase timeout of API breakage check (#171)
FranzBusch Oct 11, 2025
f1ef0dc
Add workflow to build packages for iOS. (#169)
grynspan Oct 22, 2025
1bc3591
Add Swift SDK for Android to swift_package_test workflow (#172)
marcprux Oct 23, 2025
2fe9a61
Android SDK build: install unzip package (#174)
jakepetroules Oct 24, 2025
b2b2b25
Update Android SDK build name to include NDK version (#175)
jakepetroules Oct 28, 2025
457d77c
Support .psm1 files in check-licence-header.sh (#178)
plemarquand Nov 4, 2025
00b19f5
De-matrix Android triples (#176)
jakepetroules Nov 6, 2025
3c07ac0
Always use the current version of the scripts (Linux + Wasm) (#182)
jakepetroules Nov 6, 2025
ecac3e3
Always use the current version of the scripts (Windows) (#181)
jakepetroules Nov 7, 2025
dfa66da
Always use the current version of the scripts (soundness checks) (#180)
jakepetroules Nov 7, 2025
dcbe514
Skip matrix jobs more cleanly (#183)
jakepetroules Nov 10, 2025
30f1411
Revert "Skip matrix jobs more cleanly (#183)" (#184)
shahmishal Nov 11, 2025
0afed44
Update github-workflows source location for Windows docker (#186)
bnbarham Nov 11, 2025
04e4236
Install 6.2.1 for Windows (#187)
award999 Nov 12, 2025
54f71e9
Various fixes for Amazon Linux 2 (#188)
jakepetroules Nov 20, 2025
071bbad
Switch shellcheck soundness check to a lighter weight image (#191)
jakepetroules Nov 20, 2025
30fccd9
Remove Swift SDK download archives after installing them (#192)
jakepetroules Nov 21, 2025
bd52b59
Invoke `swift-format` instead of `swift format` in `check-swift-forma…
ahoppen Dec 1, 2025
4b0f2e8
Update automerger workflow
bkhouri Dec 2, 2025
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
26 changes: 23 additions & 3 deletions .github/workflows/create_automerge_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ name: Create automerge PR
# types: [..., ready_for_review]
# ```
# Unfortunately this will also re-trigger testing evenon a normal user's PR (which may have already been tested), but skipping them causes the checks to reset so this is the best we can do for now.

permissions:
contents: read

on:
workflow_call:
inputs:
Expand All @@ -55,6 +59,14 @@ on:
type: string
description: The message that should be included in the PR created by this job
default: This PR was automatically opened by a GitHub action. Review the changes included in this PR and determine if they should be included in the release branch. If yes, merge the PR. Otherwise revert changes that should not be included on this branch.
create_as_draft:
type: boolean
description: Whether to create the PR as a draft
default: true
should_test:
type: boolean
description: Whether the created PR should trigger tests
default: false

jobs:
create_merge_pr:
Expand Down Expand Up @@ -89,6 +101,10 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
# Define variables based on workflow input
if [[ "${{ inputs.create_as_draft }} == "true" ]] ; then
DRAFT_FLAG="--draft"
fi
# Create a branch for the PR instead of opening a PR that merges head_branch directly so that we have a fixed
# target in the PR and don't modify the PR as new commits are put on the head branch.
PR_BRANCH="automerge/merge-main-$(date +%Y-%m-%d_%H-%M)"
Expand All @@ -98,7 +114,11 @@ jobs:

gh pr create \
--base "${{ inputs.base_branch }}" \
--head "$PR_BRANCH" \
--head "$PR_BRANCH" ${DRAFT_FLAG} \
--title 'Merge `${{ inputs.head_branch }}` into `${{ inputs.base_branch }}`' \
--body '${{ inputs.pr_message }}' \
--draft
--body '${{ inputs.pr_message }}'

# Trigger tests is requested
if [[ "${{ inputs.should_test }}" == "true" ]] ; then
gh pr ready "$PR_BRANCH"
fi
3 changes: 3 additions & 0 deletions .github/workflows/performance_test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Performance test

permissions:
contents: read

on:
workflow_call:
inputs:
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Pull request

permissions:
contents: read

on:
pull_request:
types: [opened, reopened, synchronize]
Expand Down Expand Up @@ -41,6 +44,12 @@ jobs:
cd MyPackage
swift package init --type library
enable_wasm_sdk_build: true
# Android
android_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
enable_android_sdk_build: true
# Windows
windows_build_command: |
mkdir MyPackage
Expand All @@ -55,6 +64,12 @@ jobs:
with:
# Skip Linux which doesn't currently support docker-less workflow
enable_linux_checks: false
# Android
android_sdk_pre_build_command: |
mkdir MyPackage
cd MyPackage
swift package init --type library
enable_android_sdk_build: true
# Windows
windows_build_command: |
mkdir MyPackage
Expand All @@ -77,10 +92,21 @@ jobs:
xcrun swift package init --type library
xcrun swift build

build_tests_ios:
name: Build iOS Tests
uses: ./.github/workflows/swift_package_test.yml
with:
enable_linux_checks: false
enable_windows_checks: false
# iOS
enable_ios_checks: true
ios_pre_build_command: |
pwd
xcrun swift package init --type library

soundness:
name: Soundness
uses: ./.github/workflows/soundness.yml
with:
api_breakage_check_enabled: false
license_header_check_project_name: "Swift.org"
format_check_enabled: false
2 changes: 1 addition & 1 deletion .github/workflows/scripts/check-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ ! -f .spi.yml ]; then
fi

if ! command -v yq &> /dev/null; then
fatal "yq could not be found. Please install yq to proceed."
apt -q update && apt -yq install yq
fi

package_files=$(find . -maxdepth 1 -name 'Package*.swift')
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/scripts/check-license-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ while IFS= read -r file_path; do
plist) continue ;; # Plists don't support line comments
proto) comment_marker='//' ;;
ps1) comment_marker='##' ;;
psm1) comment_marker='##' ;;
py) comment_marker='##'; header_prefix=$'#!/usr/bin/env python3\n' ;;
rb) comment_marker='##'; header_prefix=$'#!/usr/bin/env ruby\n' ;;
sh) comment_marker='##'; header_prefix=$'#!/bin/bash\n' ;;
Expand All @@ -116,7 +117,7 @@ while IFS= read -r file_path; do
file_header=$(head -n "${expected_file_header_linecount}" "${file_path}")
normalized_file_header=$(
echo "${file_header}" \
| sed -E -e 's/20[12][0123456789] ?- ?20[12][0123456789]/YEARS/' -e 's/20[12][0123456789]/YEARS/' \
| sed -E -e 's/20[12][0123456789] ?[-–] ?20[12][0123456789]/YEARS/' -e 's/20[12][0123456789]/YEARS/' \
)

if ! diff -u \
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/scripts/check-swift-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ fatal() { error "$@"; exit 1; }
if [[ -f .swiftformatignore ]]; then
log "Found swiftformatignore file..."

log "Running swift format format..."
tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place
log "Running swift-format format..."
tr '\n' '\0' < .swiftformatignore| xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift-format format --parallel --in-place

log "Running swift format lint..."
log "Running swift-format lint..."

tr '\n' '\0' < .swiftformatignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel
tr '\n' '\0' < .swiftformatignore | xargs -0 -I% printf '":(exclude)%" '| xargs git ls-files -z '*.swift' | xargs -0 swift-format lint --strict --parallel
else
log "Running swift format format..."
git ls-files -z '*.swift' | xargs -0 swift format format --parallel --in-place
log "Running swift-format format..."
git ls-files -z '*.swift' | xargs -0 swift-format format --parallel --in-place

log "Running swift format lint..."
log "Running swift-format lint..."

git ls-files -z '*.swift' | xargs -0 swift format lint --strict --parallel
git ls-files -z '*.swift' | xargs -0 swift-format lint --strict --parallel
fi


Expand Down
Loading
Loading