Skip to content

Commit 627e158

Browse files
committed
Merge branch 'main' of https://github.com/swiftlang/swiftly into xcode_selector
2 parents a3db0a4 + bce44d7 commit 627e158

File tree

93 files changed

+58836
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+58836
-1727
lines changed

.devcontainer/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM swift:6.1-jammy
2+
3+
RUN export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true \
4+
&& apt-get -q update \
5+
&& apt-get -q dist-upgrade -y \
6+
&& apt-get -q install -y \
7+
curl \
8+
sqlite3 \
9+
libsqlite3-dev \
10+
libncurses5-dev \
11+
python3 \
12+
build-essential \
13+
libarchive-dev

.devcontainer/devcontainer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "Swiftly",
3+
"dockerFile": "Dockerfile",
4+
"features": {
5+
"ghcr.io/devcontainers/features/common-utils:2": {
6+
"installZsh": "false",
7+
"username": "swiftly",
8+
"userUid": "1000",
9+
"userGid": "1000",
10+
"upgradePackages": "false"
11+
},
12+
"ghcr.io/devcontainers/features/git:1": {
13+
"version": "os-provided",
14+
"ppa": "false"
15+
}
16+
},
17+
// Configure tool-specific properties.
18+
"customizations": {
19+
// Configure properties specific to VS Code.
20+
"vscode": {
21+
// Add the IDs of extensions you want installed when the container is created.
22+
"extensions": [
23+
"swiftlang.swift-vscode"
24+
]
25+
}
26+
},
27+
"runArgs": [
28+
"--cap-add=SYS_PTRACE",
29+
"--security-opt",
30+
"seccomp=unconfined"
31+
],
32+
"mounts": [
33+
],
34+
// Use 'postCreateCommand' to run commands after the container is created.
35+
"postCreateCommand": "echo OK",
36+
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
37+
"remoteUser": "swiftly"
38+
}

.github/workflows/build_release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ env:
1818
SWIFTLY_BOOTSTRAP_VERSION: 1.0.0
1919

2020
jobs:
21-
buildrelease:
22-
name: Build Release
21+
buildrelease-linux:
22+
name: Build Release / Linux x86_64
2323
runs-on: ubuntu-latest
2424
container:
2525
image: "redhat/ubi9"
@@ -44,3 +44,20 @@ jobs:
4444
name: swiftly-docs
4545
path: .build/docs/**
4646
if-no-files-found: error
47+
48+
buildrelease-macos:
49+
name: Build Release / macOS
50+
runs-on: [self-hosted, macos, sequoia, ARM64]
51+
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v4
54+
- name: Prepare the action
55+
run: ./scripts/prep-gh-action.sh --install-swiftly
56+
- name: Build Release Artifact
57+
run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }}
58+
- name: Upload Release Artifact
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: swiftly-release-x86_64
62+
path: .build/release/swiftly-*.tar.gz
63+
if-no-files-found: error
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Smoke Test - Nightly Swift Toolchain
2+
3+
on:
4+
schedule:
5+
- cron: '30 3 * * *'
6+
7+
jobs:
8+
tests-selfhosted-linux:
9+
name: Test (Smoke Test - Nightly Swift Toolchain) / ${{ matrix.container }}
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
container: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "redhat/ubi9", "debian:12"]
15+
container:
16+
image: ${{ matrix.container }}
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
- name: Prepare the action
21+
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot
22+
- name: Build and Test
23+
# UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908
24+
# UBI 9 - See https://github.com/swiftlang/swift/issues/80909
25+
run: bash -c 'if [[ "${{ matrix.container }}" == "redhat/ubi9" ]]; then swiftly run +main-snapshot swift build --build-tests; elif [[ "${{ matrix.container }}" == "ubuntu:20.04" ]]; then swiftly run +main-snapshot swift build --build-tests; else swiftly run +main-snapshot swift test; fi'
26+
27+
tests-selfhosted-macos:
28+
name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64
29+
runs-on: [self-hosted, macos, sequoia, ARM64]
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
- name: Prepare the action
34+
run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot
35+
- name: Build and Test
36+
run: swiftly run +main-snapshot swift test

.github/workflows/pull_request.yml

Lines changed: 65 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
push:
77
branches: [main]
88

9-
env:
10-
SWIFTLY_BOOTSTRAP_VERSION: 1.0.0
11-
129
jobs:
1310
soundness:
1411
name: Soundness
@@ -22,6 +19,20 @@ jobs:
2219
shell_check_enabled: false
2320
unacceptable_language_check_enabled: true
2421

22+
macos-tests-selfhosted:
23+
name: Test (Self Hosted) / macOS Sequoia ARM64
24+
runs-on: [self-hosted, macos, sequoia, ARM64]
25+
strategy:
26+
fail-fast: false
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
- name: Prepare the action
31+
run: ./scripts/prep-gh-action.sh --install-swiftly
32+
- name: Build and Test
33+
run: swift test
34+
timeout-minutes: 60
35+
2536
tests-selfhosted:
2637
name: Test (Self Hosted) / ${{ matrix.container }}
2738
runs-on: ubuntu-latest
@@ -37,10 +48,12 @@ jobs:
3748
- name: Prepare the action
3849
run: ./scripts/prep-gh-action.sh --install-swiftly
3950
- name: Build and Test
40-
run: swift test
51+
# UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908
52+
# UBI 9 - See https://github.com/swiftlang/swift/issues/80909
53+
run: bash -c 'if [[ "${{ matrix.container }}" == "redhat/ubi9" ]]; then swift build --build-tests; elif [[ "${{ matrix.container }}" == "ubuntu:20.04" ]]; then swift build --build-tests; else swift test; fi'
4154

4255
releasebuildcheck:
43-
name: Release Build Check
56+
name: Release Build Check / Linux
4457
runs-on: ubuntu-latest
4558
container:
4659
image: "redhat/ubi9"
@@ -61,11 +74,36 @@ jobs:
6174
- name: Upload Tests
6275
uses: actions/upload-artifact@v4
6376
with:
64-
name: swiftly-tests-x86_64
77+
name: test-swiftly-linux-x86_64
6578
path: .build/debug/test-swiftly-linux-x86_64.tar.gz
6679
if-no-files-found: error
6780
retention-days: 1
6881

82+
releasebuildcheckmacos:
83+
name: Release Build Check / macOS
84+
runs-on: [self-hosted, macos, sequoia, ARM64]
85+
steps:
86+
- name: Checkout repository
87+
uses: actions/checkout@v4
88+
- name: Prepare the action
89+
run: ./scripts/prep-gh-action.sh --install-swiftly
90+
- name: Build Artifact
91+
run: swift run build-swiftly-release --test --skip "999.0.0"
92+
- name: Upload Artifact
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: swiftly-release-darwin
96+
path: .build/release/swiftly-*.pkg
97+
if-no-files-found: error
98+
retention-days: 1
99+
- name: Upload Tests
100+
uses: actions/upload-artifact@v4
101+
with:
102+
name: test-swiftly-macos
103+
path: .build/release/test-swiftly-macos.tar.gz
104+
if-no-files-found: error
105+
retention-days: 1
106+
69107
releasetest:
70108
name: Test Release / ${{matrix.shell.pkg}}
71109
needs: releasebuildcheck
@@ -90,10 +128,30 @@ jobs:
90128
- name: Download Tests
91129
uses: actions/download-artifact@v4
92130
with:
93-
name: swiftly-tests-x86_64
131+
name: test-swiftly-linux-x86_64
94132
- name: Extract and Run Workflow Tests
95133
run: cp swiftly-*.tar.gz /root/swiftly.tar.gz && cp test-swiftly-*.tar.gz /root && cd /root && tar zxf test-swiftly-*.tar.gz && ./test-swiftly -y ./swiftly.tar.gz
96134

135+
release-custom-install-test:
136+
name: Test Release - Custom Install Location
137+
needs: releasebuildcheck
138+
runs-on: ubuntu-latest
139+
container:
140+
image: "ubuntu:24.04"
141+
steps:
142+
- name: Prepare System
143+
run: apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install ca-certificates gpg tzdata
144+
- name: Download Release
145+
uses: actions/download-artifact@v4
146+
with:
147+
name: swiftly-release-x86_64
148+
- name: Download Tests
149+
uses: actions/download-artifact@v4
150+
with:
151+
name: test-swiftly-linux-x86_64
152+
- name: Extract and Run Workflow Tests
153+
run: cp swiftly-*.tar.gz /root/swiftly.tar.gz && cp test-swiftly-*.tar.gz /root && cd /root && tar zxf test-swiftly-*.tar.gz && ./test-swiftly -y --custom-location ./swiftly.tar.gz
154+
97155
formatcheck:
98156
name: Format Check
99157
runs-on: ubuntu-latest

.unacceptablelanguageignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Sources/SwiftlyCore/ProcessInfo.swift

CODEOWNERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is a list of the people responsible for ensuring that patches for a
2+
# particular part of Swift are reviewed, either by themselves or by someone else.
3+
# They are also the gatekeepers for their part of Swift, with the final word on
4+
# what goes in or not.
5+
#
6+
# The list is sorted by surname and formatted to allow easy grepping and
7+
# beautification by scripts. The fields are: name (N), email (E), web-address
8+
# (W), PGP key ID and fingerprint (P), description (D), and snail-mail address
9+
# (S).
10+
11+
* @shahmishal @cmcgee1024 @justice-adams-apple @etcwilde

0 commit comments

Comments
 (0)