Skip to content

Commit 51c1b87

Browse files
authored
Update to Swift 6.2 (#195)
This PR updates to Swift 6.2 and resolves a build error after updating to Swift 6.2-snapshot in apple/containerization#94.
1 parent 8479860 commit 51c1b87

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

.github/workflows/common.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
jobs:
1212
buildAndTest:
1313
name: Build and test the project
14-
timeout-minutes: 30
14+
timeout-minutes: 60
1515
runs-on: [self-hosted, macos, sequoia, ARM64]
1616
permissions:
1717
contents: read
@@ -24,10 +24,6 @@ jobs:
2424
with:
2525
fetch-depth: 0
2626

27-
- name: Update containerization
28-
run: |
29-
/usr/bin/swift package update containerization
30-
3127
- name: Check formatting
3228
run: |
3329
./scripts/install-hawkeye.sh
@@ -47,7 +43,9 @@ jobs:
4743
git diff --name-only -- .
4844
false
4945
fi
50-
46+
env:
47+
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
48+
5149
- name: Set build configuration
5250
run: |
5351
echo "BUILD_CONFIGURATION=debug" >> $GITHUB_ENV
@@ -60,7 +58,7 @@ jobs:
6058
make container dsym docs
6159
tar cfz _site.tgz _site
6260
env:
63-
DEVELOPER_DIR: "/Applications/Xcode_16.3.app/Contents/Developer"
61+
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
6462

6563
- name: Create package
6664
run: |
@@ -73,7 +71,7 @@ jobs:
7371
launchctl setenv HTTP_PROXY $HTTP_PROXY
7472
make test cleancontent install-kernel integration
7573
env:
76-
DEVELOPER_DIR: "/Applications/Xcode_16.3.app/Contents/Developer"
74+
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
7775
CURRENT_SDK: y # explicitly repeated due to local env block
7876

7977
- name: Save documentation artifact

Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version: 6.0
1+
// swift-tools-version: 6.2
22
//===----------------------------------------------------------------------===//
33
// Copyright © 2025 Apple Inc. and the container project authors. All rights reserved.
44
//

scripts/install-init.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,18 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
SWIFT="/usr/bin/swift"
17+
IMAGE_NAME="vminit:latest"
1618
DESTDIR="${1:-$(git rev-parse --show-toplevel)/bin}"
1719
mkdir -p "${DESTDIR}"
1820

19-
IMAGE_NAME="vminit:latest"
20-
21-
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
21+
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
2222
if [ ! -z "${CONTAINERIZATION_PATH}" -o "${CONTAINERIZATION_VERSION}" == "unspecified" ] ; then
23-
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
23+
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
2424
echo "Creating InitImage"
2525
make -C ${CONTAINERIZATION_PATH} init
2626
${CONTAINERIZATION_PATH}/bin/cctl images save -o /tmp/init.tar ${IMAGE_NAME}
27-
# sleep because commands after stop and start are racy
27+
# Sleep because commands after stop and start are racy.
2828
bin/container system stop && sleep 3 && bin/container system start && sleep 3
2929
bin/container i load -i /tmp/init.tar
3030
rm /tmp/init.tar

0 commit comments

Comments
 (0)