Skip to content
Merged
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
94 changes: 51 additions & 43 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,46 +2,54 @@ name: Bug Report
description: Something isn't working as expected
labels: [bug]
body:
- type: checkboxes
id: cat-preferences
attributes:
label: "Is it reproducible with SwiftPM command-line tools: `swift build`, `swift test`, `swift package` etc?"
description: "Issues related to closed-source software are not tracked by this repository and will be closed. For Xcode and `xcodebuild`, please file a feedback at https://feedbackassistant.apple.com instead."
options:
- label: Confirmed reproduction steps with SwiftPM CLI. The description text _must_ include reproduction steps with either of command-line SwiftPM commands, `swift build`, `swift test`, `swift package` etc.
required: true
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Actual behavior
description: What actually happened.
validations:
required: false
- type: textarea
attributes:
label: Steps to reproduce
placeholder: |
1. ...
2. ...
validations:
required: false
- type: input
attributes:
label: Swift Package Manager version/commit hash
validations:
required: false
- type: textarea
attributes:
label: Swift & OS version (output of `swift --version ; uname -a`)
validations:
required: false
- type: checkboxes
id: cat-preferences
attributes:
label: >-
Is it reproducible with SwiftPM command-line tools: `swift build`,
`swift test`, `swift package` etc?
description: >-
Issues related to closed-source software are not tracked by this
repository and will be closed. For Xcode and `xcodebuild`, please
file a feedback at https://feedbackassistant.apple.com instead."
options:
- label: >-
Confirmed reproduction steps with SwiftPM CLI. The description
text _must_ include reproduction steps with either of command-line
SwiftPM commands, `swift build`, `swift test`, `swift package` etc.
required: true
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Actual behavior
description: What actually happened.
validations:
required: false
- type: textarea
attributes:
label: Steps to reproduce
placeholder: |
1. ...
2. ...
validations:
required: false
- type: input
attributes:
label: Swift Package Manager version/commit hash
validations:
required: false
- type: textarea
attributes:
label: Swift & OS version (output of `swift --version ; uname -a`)
validations:
required: false
70 changes: 35 additions & 35 deletions .github/ISSUE_TEMPLATE/FEATURE_REQUEST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@ name: Feature Request
description: A suggestion for a new feature
labels: [enhancement]
body:
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Actual behavior
description: What actually happened.
validations:
required: false
- type: textarea
attributes:
label: Steps to reproduce
placeholder: |
1. ...
2. ...
validations:
required: false
- type: input
attributes:
label: Swift Package Manager version/commit hash
validations:
required: false
- type: textarea
attributes:
label: Swift & OS version (output of `swift --version && uname -a`)
validations:
required: false
- type: textarea
attributes:
label: Description
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: What you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Actual behavior
description: What actually happened.
validations:
required: false
- type: textarea
attributes:
label: Steps to reproduce
placeholder: |
1. ...
2. ...
validations:
required: false
- type: input
attributes:
label: Swift Package Manager version/commit hash
validations:
required: false
- type: textarea
attributes:
label: Swift & OS version (output of `swift --version && uname -a`)
validations:
required: false
40 changes: 40 additions & 0 deletions .github/scripts/prebuild.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
##===----------------------------------------------------------------------===##
##
## This source file is part of the Swift open source project
##
## Copyright (c) 2025 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
##
##===----------------------------------------------------------------------===##

param (
[switch]$SkipAndroid,
[switch]$InstallCMake
)

# winget isn't easily made available in containers, so use chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

if ($InstallCMake) {
choco install -y cmake --installargs 'ADD_CMAKE_TO_PATH=System' --apply-install-arguments-to-dependencies
choco install -y ninja

Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv

# Let swiftc find the path to link.exe in the CMake smoke test
$env:Path += ";$(Split-Path -Path "$(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" "-latest" -products Microsoft.VisualStudio.Product.BuildTools -find VC\Tools\MSVC\*\bin\HostX64\x64\link.exe)" -Parent)"
}

if (-not $SkipAndroid) {
choco install -y android-ndk

Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv

# Work around a bug in the package causing the env var to be set incorrectly
$env:ANDROID_NDK_ROOT = $env:ANDROID_NDK_ROOT.replace('-windows.zip','')
}
85 changes: 85 additions & 0 deletions .github/scripts/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the Swift open source project
##
## Copyright (c) 2025 Apple Inc. and the Swift project authors
## Licensed under Apache License v2.0 with Runtime Library Exception
##
## See http://swift.org/LICENSE.txt for license information
## See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
##
##===----------------------------------------------------------------------===##

set -e

if [[ $(uname) == Darwin ]] ; then
if [[ "$INSTALL_CMAKE" == "1" ]] ; then
mkdir -p "$RUNNER_TOOL_CACHE"
if ! command -v cmake >/dev/null 2>&1 ; then
curl -fsSLO https://github.com/Kitware/CMake/releases/download/v4.1.2/cmake-4.1.2-macos-universal.tar.gz
echo '3be85f5b999e327b1ac7d804cbc9acd767059e9f603c42ec2765f6ab68fbd367 cmake-4.1.2-macos-universal.tar.gz' > cmake-4.1.2-macos-universal.tar.gz.sha256
sha256sum -c cmake-4.1.2-macos-universal.tar.gz.sha256
tar -xf cmake-4.1.2-macos-universal.tar.gz
ln -s "$PWD/cmake-4.1.2-macos-universal/CMake.app/Contents/bin/cmake" "$RUNNER_TOOL_CACHE/cmake"
fi
if ! command -v ninja >/dev/null 2>&1 ; then
curl -fsSLO https://github.com/ninja-build/ninja/releases/download/v1.13.1/ninja-mac.zip
echo 'da7797794153629aca5570ef7c813342d0be214ba84632af886856e8f0063dd9 ninja-mac.zip' > ninja-mac.zip.sha256
sha256sum -c ninja-mac.zip.sha256
unzip ninja-mac.zip
rm -f ninja-mac.zip
mv ninja "$RUNNER_TOOL_CACHE/ninja"
fi
fi
elif command -v apt-get >/dev/null 2>&1 ; then # bookworm, noble, jammy
export DEBIAN_FRONTEND=noninteractive

apt-get update -y

# Build dependencies
apt-get install -y libsqlite3-dev libncurses-dev

# Debug symbols
apt-get install -y libc6-dbg

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

# Build dependencies
dnf install -y sqlite-devel ncurses-devel

# Debug symbols
dnf debuginfo-install -y glibc
elif command -v yum >/dev/null 2>&1 ; then # amazonlinux2
yum update -y

# Build dependencies
yum install -y sqlite-devel ncurses-devel

# Debug symbols
yum install -y yum-utils
debuginfo-install -y glibc
fi
23 changes: 23 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Create PR to merge main into release branch
# In the first period after branching the release branch,
# we typically want to include many changes from `main` in the release branch.
# This workflow automatically creates a PR to merge the main into the release branch.
# Later in the release cycle we should stop this practice to avoid landing risky changes by disabling this workflow.
# To do so, disable the workflow as described in https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/disabling-and-enabling-a-workflow
permissions:
contents: read
on:
schedule:
- cron: '0 9 * * MON'
workflow_dispatch:
jobs:
create_merge_pr:
name: Create PR to merge main into release branch
uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@main
with:
head_branch: main
base_branch: release/6.3
permissions:
contents: write
pull-requests: write
if: (github.event_name == 'schedule' && github.repository == 'swiftlang/swift-package-manager') || (github.event_name != 'schedule') # Ensure that we don't run this on a schedule in a fork
40 changes: 40 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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@main
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"]'
windows_pre_build_command: 'Invoke-Program .\.github\scripts\prebuild.ps1'
windows_build_command: 'Invoke-Program swift build'
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'

soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
with:
license_header_check_project_name: "Swift"
license_header_check_enabled: false
unacceptable_language_check_enabled: false
api_breakage_check_enabled: false
format_check_enabled: false
shell_check_enabled: false
11 changes: 11 additions & 0 deletions .license_header_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@@===----------------------------------------------------------------------===@@
@@
@@ This source file is part of the Swift open source project
@@
@@ Copyright (c) YEARS Apple Inc. and the Swift project authors
@@ Licensed under Apache License v2.0 with Runtime Library Exception
@@
@@ See http://swift.org/LICENSE.txt for license information
@@ See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
@@
@@===----------------------------------------------------------------------===@@
10 changes: 10 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**/*.mlmodel
**/*.pbxproj
**/*.png
**/*.xcworkspacedata
**/Package.swift
.dir-locals.el
.editorconfig
.swift-version
CODEOWNERS
Package.swift
Loading