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
https://github.com/apple/containerization/pull/94.
This commit is contained in:
Dmitry Kovba
2025-06-13 17:27:50 -07:00
committed by GitHub
parent 84798601cd
commit 51c1b879d2
4 changed files with 15 additions and 17 deletions
+6 -8
View File
@@ -11,7 +11,7 @@ on:
jobs:
buildAndTest:
name: Build and test the project
timeout-minutes: 30
timeout-minutes: 60
runs-on: [self-hosted, macos, sequoia, ARM64]
permissions:
contents: read
@@ -24,10 +24,6 @@ jobs:
with:
fetch-depth: 0
- name: Update containerization
run: |
/usr/bin/swift package update containerization
- name: Check formatting
run: |
./scripts/install-hawkeye.sh
@@ -47,7 +43,9 @@ jobs:
git diff --name-only -- .
false
fi
env:
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
- name: Set build configuration
run: |
echo "BUILD_CONFIGURATION=debug" >> $GITHUB_ENV
@@ -60,7 +58,7 @@ jobs:
make container dsym docs
tar cfz _site.tgz _site
env:
DEVELOPER_DIR: "/Applications/Xcode_16.3.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
- name: Create package
run: |
@@ -73,7 +71,7 @@ jobs:
launchctl setenv HTTP_PROXY $HTTP_PROXY
make test cleancontent install-kernel integration
env:
DEVELOPER_DIR: "/Applications/Xcode_16.3.app/Contents/Developer"
DEVELOPER_DIR: "/Applications/Xcode_26.b1.app/Contents/Developer"
CURRENT_SDK: y # explicitly repeated due to local env block
- name: Save documentation artifact
+3 -3
View File
@@ -1,5 +1,5 @@
{
"originHash" : "21dad499f34492edb861e54fe1e03ee3b00aa3d7371af6b09253bf04495427b9",
"originHash" : "4ac93777a9a369fb7c46f1af4cd15c516926a8f4b23679f1ee2bc40b9a422313",
"pins" : [
{
"identity" : "async-http-client",
@@ -87,8 +87,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-atomics.git",
"state" : {
"revision" : "cd142fd2f64be2100422d658e7411e39489da985",
"version" : "1.2.0"
"revision" : "b601256eab081c0f92f059e12818ac1d4f178ff7",
"version" : "1.3.0"
}
},
{
+1 -1
View File
@@ -1,4 +1,4 @@
// swift-tools-version: 6.0
// swift-tools-version: 6.2
//===----------------------------------------------------------------------===//
// Copyright © 2025 Apple Inc. and the container project authors. All rights reserved.
//
+5 -5
View File
@@ -13,18 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
SWIFT="/usr/bin/swift"
IMAGE_NAME="vminit:latest"
DESTDIR="${1:-$(git rev-parse --show-toplevel)/bin}"
mkdir -p "${DESTDIR}"
IMAGE_NAME="vminit:latest"
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
CONTAINERIZATION_VERSION="${CONTAINERIZATION_VERSION:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .version')}"
if [ ! -z "${CONTAINERIZATION_PATH}" -o "${CONTAINERIZATION_VERSION}" == "unspecified" ] ; then
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(swift package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
CONTAINERIZATION_PATH="${CONTAINERIZATION_PATH:-$(${SWIFT} package show-dependencies --format json | jq -r '.dependencies[] | select(.identity == "containerization") | .path')}"
echo "Creating InitImage"
make -C ${CONTAINERIZATION_PATH} init
${CONTAINERIZATION_PATH}/bin/cctl images save -o /tmp/init.tar ${IMAGE_NAME}
# sleep because commands after stop and start are racy
# Sleep because commands after stop and start are racy.
bin/container system stop && sleep 3 && bin/container system start && sleep 3
bin/container i load -i /tmp/init.tar
rm /tmp/init.tar