From 9716bab9c1f336c1479714512f8154a00c8e523e Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:20:00 -0400 Subject: [PATCH 01/15] Add macOS job to pull request workflow --- .github/workflows/pull_request.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9aff96fb..6e1df673 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -22,6 +22,22 @@ jobs: shell_check_enabled: false unacceptable_language_check_enabled: true + macos-tests-selfhosted: + name: macOS (Sequoia ARM64) + runs-on: [self-hosted, macos, sequoia, ARM64] + strategy: + fail-fast: false + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Select Xcode + run: echo "DEVELOPER_DIR=/Applications/Xcode_16.3.app" >> $GITHUB_ENV + - name: Swift version + run: xcrun swift --version + - name: Build / Test + run: xcrun swift test + timeout-minutes: 60 + tests-selfhosted: name: Test (Self Hosted) / ${{ matrix.container }} runs-on: ubuntu-latest From b55720e675d5de89e2144fc9fd4c712cbb4012fc Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:34:21 -0400 Subject: [PATCH 02/15] Use swiftly to install swift for macOS --- .github/workflows/pull_request.yml | 12 ++++++------ scripts/prep-gh-action.sh | 23 ++++++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6e1df673..0b2b39b5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -23,19 +23,19 @@ jobs: unacceptable_language_check_enabled: true macos-tests-selfhosted: - name: macOS (Sequoia ARM64) + name: Test (Self Hosted) / macOS Sequoia ARM64 runs-on: [self-hosted, macos, sequoia, ARM64] strategy: fail-fast: false steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Select Xcode - run: echo "DEVELOPER_DIR=/Applications/Xcode_16.3.app" >> $GITHUB_ENV + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly - name: Swift version - run: xcrun swift --version - - name: Build / Test - run: xcrun swift test + run: swift --version + - name: Build and Test + run: swift test timeout-minutes: 60 tests-selfhosted: diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index 85e4033a..c236f954 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -2,11 +2,13 @@ # This script does a bit of extra preparation of the docker containers used to run the GitHub workflows # that are specific to this project's needs when building/testing. Note that this script runs on -# every supported Linux distribution so it must adapt to the distribution that it is running. +# every supported Linux distribution and macOS so it must adapt to the distribution that it is running. -# Install the basic utilities depending on the type of Linux distribution -apt-get --help && apt-get update && TZ=Etc/UTC apt-get -y install curl make gpg tzdata -yum --help && (curl --help && yum -y install curl) && yum install make gpg +if [[ "$(uname -s)" == "Linux" ]]; then + # Install the basic utilities depending on the type of Linux distribution + apt-get --help && apt-get update && TZ=Etc/UTC apt-get -y install curl make gpg tzdata + yum --help && (curl --help && yum -y install curl) && yum install make gpg +fi set -e @@ -27,7 +29,12 @@ done if [ "$installSwiftly" == true ]; then echo "Installing swiftly" - curl -O https://download.swift.org/swiftly/linux/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}-$(uname -m).tar.gz && tar zxf swiftly-*.tar.gz && ./swiftly init -y --skip-install + + if [[ "$(uname -s)" == "Linux" ]]; then + curl -O https://download.swift.org/swiftly/linux/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}-$(uname -m).tar.gz && tar zxf swiftly-*.tar.gz && ./swiftly init -y --skip-install + else + curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && installer -pkg swiftly-*.pkg -target CurrentUserHomeDirectory && ~/.swiftly/bin/ init -y --skip-install + fi . "/root/.local/share/swiftly/env.sh" hash -r @@ -64,7 +71,9 @@ if [ "$installSwiftly" == true ]; then echo "Displaying swift version" swiftly run "${runSelector[@]}" swift --version - CC=clang swiftly run "${runSelector[@]}" "$(dirname "$0")/install-libarchive.sh" + if [[ "$(uname -s)" == "Linux" ]]; then + CC=clang swiftly run "${runSelector[@]}" "$(dirname "$0")/install-libarchive.sh" else - "$(dirname "$0")/install-libarchive.sh" + "$(dirname "$0")/install-libarchive.sh" + fi fi From b06994848fbb4880b13010914417153db83111c8 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:46:36 -0400 Subject: [PATCH 03/15] Customize swiftly home and toolchain locations for macOS --- .github/workflows/pull_request.yml | 4 +--- scripts/prep-gh-action.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 0b2b39b5..2b15ad74 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -7,7 +7,7 @@ on: branches: [main] env: - SWIFTLY_BOOTSTRAP_VERSION: 1.0.0 + SWIFTLY_BOOTSTRAP_VERSION: 1.0.1-dev jobs: soundness: @@ -32,8 +32,6 @@ jobs: uses: actions/checkout@v4 - name: Prepare the action run: ./scripts/prep-gh-action.sh --install-swiftly - - name: Swift version - run: swift --version - name: Build and Test run: swift test timeout-minutes: 60 diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index c236f954..fb1dddb4 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -32,11 +32,18 @@ if [ "$installSwiftly" == true ]; then if [[ "$(uname -s)" == "Linux" ]]; then curl -O https://download.swift.org/swiftly/linux/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}-$(uname -m).tar.gz && tar zxf swiftly-*.tar.gz && ./swiftly init -y --skip-install + . "/root/.local/share/swiftly/env.sh" else - curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && installer -pkg swiftly-*.pkg -target CurrentUserHomeDirectory && ~/.swiftly/bin/ init -y --skip-install + export SWIFTLY_HOME_DIR="$(pwd)/swiftly-bootstrap" + export SWIFTLY_BIN_DIR="$SWIFTLY_HOME_DIR/bin" + export SWIFTLY_TOOLCHAIN_DIR="$SWIFTLY_HOME_DIR/toolchains" + mkdir -p "$SWIFTLY_HOME_DIR" + + curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && pkgutil --check-signature swiftly-*.pkg && pkgutil --verbose --expand swiftly-*.pkg . && tar -C "${SWIFTLY_HOME_DIR}" xvf Payload && "$SWIFTLY_HOME_DIR/bin/swiftly" init -y --skip-install + + . "$SWIFTLY_HOME_DIR/env.sh" fi - . "/root/.local/share/swiftly/env.sh" hash -r if [ -n "$GITHUB_ENV" ]; then From 10a76152327386b9461f61dec6b713fbc39a867c Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:53:44 -0400 Subject: [PATCH 04/15] Correct prep script for macOS --- scripts/prep-gh-action.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index fb1dddb4..800f3df3 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -39,7 +39,7 @@ if [ "$installSwiftly" == true ]; then export SWIFTLY_TOOLCHAIN_DIR="$SWIFTLY_HOME_DIR/toolchains" mkdir -p "$SWIFTLY_HOME_DIR" - curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && pkgutil --check-signature swiftly-*.pkg && pkgutil --verbose --expand swiftly-*.pkg . && tar -C "${SWIFTLY_HOME_DIR}" xvf Payload && "$SWIFTLY_HOME_DIR/bin/swiftly" init -y --skip-install + curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && pkgutil --check-signature swiftly-*.pkg && pkgutil --verbose --expand swiftly-*.pkg "${SWIFTLY_HOME_DIR}" && tar -C "${SWIFTLY_HOME_DIR}" -xvf "${SWIFTLY_HOME_DIR}"/swiftly-*/Payload && "$SWIFTLY_HOME_DIR/bin/swiftly" init -y --skip-install . "$SWIFTLY_HOME_DIR/env.sh" fi From fce8601e4bf1f2ede3bb38223cc83c00430cc7e8 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:56:27 -0400 Subject: [PATCH 05/15] Remove pre-emptive mkdir, allowing pkgutil to create the bootstrap directory --- scripts/prep-gh-action.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index 800f3df3..c7192c5a 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -37,7 +37,6 @@ if [ "$installSwiftly" == true ]; then export SWIFTLY_HOME_DIR="$(pwd)/swiftly-bootstrap" export SWIFTLY_BIN_DIR="$SWIFTLY_HOME_DIR/bin" export SWIFTLY_TOOLCHAIN_DIR="$SWIFTLY_HOME_DIR/toolchains" - mkdir -p "$SWIFTLY_HOME_DIR" curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && pkgutil --check-signature swiftly-*.pkg && pkgutil --verbose --expand swiftly-*.pkg "${SWIFTLY_HOME_DIR}" && tar -C "${SWIFTLY_HOME_DIR}" -xvf "${SWIFTLY_HOME_DIR}"/swiftly-*/Payload && "$SWIFTLY_HOME_DIR/bin/swiftly" init -y --skip-install From b7c8b1e46c6e8107bbe56c17a8763bac54ecff7c Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 14:59:51 -0400 Subject: [PATCH 06/15] Customize the swiftly toolchains directory --- scripts/prep-gh-action.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index c7192c5a..3e075784 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -36,7 +36,7 @@ if [ "$installSwiftly" == true ]; then else export SWIFTLY_HOME_DIR="$(pwd)/swiftly-bootstrap" export SWIFTLY_BIN_DIR="$SWIFTLY_HOME_DIR/bin" - export SWIFTLY_TOOLCHAIN_DIR="$SWIFTLY_HOME_DIR/toolchains" + export SWIFTLY_TOOLCHAINS_DIR="$SWIFTLY_HOME_DIR/toolchains" curl -O https://download.swift.org/swiftly/darwin/swiftly-${SWIFTLY_BOOTSTRAP_VERSION}.pkg && pkgutil --check-signature swiftly-*.pkg && pkgutil --verbose --expand swiftly-*.pkg "${SWIFTLY_HOME_DIR}" && tar -C "${SWIFTLY_HOME_DIR}" -xvf "${SWIFTLY_HOME_DIR}"/swiftly-*/Payload && "$SWIFTLY_HOME_DIR/bin/swiftly" init -y --skip-install @@ -47,7 +47,7 @@ if [ "$installSwiftly" == true ]; then if [ -n "$GITHUB_ENV" ]; then echo "Updating GitHub environment" - echo "PATH=$PATH" >> "$GITHUB_ENV" && echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> "$GITHUB_ENV" && echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> "$GITHUB_ENV" + echo "PATH=$PATH" >> "$GITHUB_ENV" && echo "SWIFTLY_HOME_DIR=$SWIFTLY_HOME_DIR" >> "$GITHUB_ENV" && echo "SWIFTLY_BIN_DIR=$SWIFTLY_BIN_DIR" >> "$GITHUB_ENV" && echo "SWIFTLY_TOOLCHAINS_DIR=$SWIFTLY_TOOLCHAINS_DIR" >> "$GITHUB_ENV" fi selector=() From 86ddcbcd527592ae227faeb894e246d02216bc17 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 15:04:54 -0400 Subject: [PATCH 07/15] Remove errant else from preparation script --- scripts/prep-gh-action.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index 3e075784..04644978 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -79,7 +79,6 @@ if [ "$installSwiftly" == true ]; then if [[ "$(uname -s)" == "Linux" ]]; then CC=clang swiftly run "${runSelector[@]}" "$(dirname "$0")/install-libarchive.sh" -else "$(dirname "$0")/install-libarchive.sh" fi fi From 351a2dfe74938367296fcda5515020fa807afdce Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 15:13:23 -0400 Subject: [PATCH 08/15] prep script fix --- scripts/prep-gh-action.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/prep-gh-action.sh b/scripts/prep-gh-action.sh index 04644978..85a420b6 100755 --- a/scripts/prep-gh-action.sh +++ b/scripts/prep-gh-action.sh @@ -79,6 +79,9 @@ if [ "$installSwiftly" == true ]; then if [[ "$(uname -s)" == "Linux" ]]; then CC=clang swiftly run "${runSelector[@]}" "$(dirname "$0")/install-libarchive.sh" + fi +else + if [[ "$(uname -s)" == "Linux" ]]; then "$(dirname "$0")/install-libarchive.sh" fi fi From 950fe43792ce8015f6b5e91f6c09b7007c040a65 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 15:18:58 -0400 Subject: [PATCH 09/15] Build release check for macOS --- .github/workflows/pull_request.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2b15ad74..b3f9b09d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -56,7 +56,7 @@ jobs: 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' releasebuildcheck: - name: Release Build Check + name: Release Build Check / Linux runs-on: ubuntu-latest container: image: "redhat/ubi9" @@ -82,6 +82,31 @@ jobs: if-no-files-found: error retention-days: 1 + releasebuildcheckmacos: + name: Release Build Check / macOS + runs-on: [self-hosted, macos, sequoia, ARM64] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly + - name: Build Artifact + run: swift run build-swiftly-release --test --skip "999.0.0" + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: swiftly-release-darwin + path: .build/release/swiftly-*.pkg + if-no-files-found: error + retention-days: 1 + - name: Upload Tests + uses: actions/upload-artifact@v4 + with: + name: swiftly-tests-darwin + path: .build/debug/test-swiftly-darwin-arm64.tar.gz + if-no-files-found: error + retention-days: 1 + releasetest: name: Test Release / ${{matrix.shell.pkg}} needs: releasebuildcheck From 9e64edc735cdd8e7b959b05775a7c8a1571d5e51 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 15:32:53 -0400 Subject: [PATCH 10/15] Add macOS nightly smoke test and release workflow --- .github/workflows/build_release.yml | 19 ++++++++++++++++++- .github/workflows/nightly_snapshot_check.yml | 11 +++++++++++ .github/workflows/pull_request.yml | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 7519af5e..5f772936 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -19,7 +19,7 @@ env: jobs: buildrelease: - name: Build Release + name: Build Release / Linux x86_64 runs-on: ubuntu-latest container: image: "redhat/ubi9" @@ -44,3 +44,20 @@ jobs: name: swiftly-docs path: .build/docs/** if-no-files-found: error + + buildrelease: + name: Build Release / macOS + runs-on: [self-hosted, macos, sequoia, ARM64] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly + - name: Build Release Artifact + run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} + - name: Upload Release Artifact + uses: actions/upload-artifact@v4 + with: + name: swiftly-release-x86_64 + path: .build/release/swiftly-*.tar.gz + if-no-files-found: error diff --git a/.github/workflows/nightly_snapshot_check.yml b/.github/workflows/nightly_snapshot_check.yml index 6a395cd9..dd1c57f1 100644 --- a/.github/workflows/nightly_snapshot_check.yml +++ b/.github/workflows/nightly_snapshot_check.yml @@ -26,3 +26,14 @@ jobs: # UBI 9 and Ubuntu 20.04 - See https://github.com/swiftlang/swift/issues/80908 # UBI 9 - See https://github.com/swiftlang/swift/issues/80909 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' + + tests-selfhosted: + name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64 + runs-on: [self-hosted, macos, sequoia, ARM64] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot + - name: Build and Test + run: swift test diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index b3f9b09d..f1f8f8a5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -103,7 +103,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: swiftly-tests-darwin - path: .build/debug/test-swiftly-darwin-arm64.tar.gz + path: .build/debug/test-swiftly-macos.tar.gz if-no-files-found: error retention-days: 1 From 7c6d3d4d7c135b24e1a98186669ca70ca68d5554 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 15:36:33 -0400 Subject: [PATCH 11/15] Fix YAML duplicate keys --- .github/workflows/build_release.yml | 4 ++-- .github/workflows/nightly_snapshot_check.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 5f772936..e03ec3dd 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -18,7 +18,7 @@ env: SWIFTLY_BOOTSTRAP_VERSION: 1.0.0 jobs: - buildrelease: + buildrelease-linux: name: Build Release / Linux x86_64 runs-on: ubuntu-latest container: @@ -45,7 +45,7 @@ jobs: path: .build/docs/** if-no-files-found: error - buildrelease: + buildrelease-macos: name: Build Release / macOS runs-on: [self-hosted, macos, sequoia, ARM64] steps: diff --git a/.github/workflows/nightly_snapshot_check.yml b/.github/workflows/nightly_snapshot_check.yml index dd1c57f1..be05bba3 100644 --- a/.github/workflows/nightly_snapshot_check.yml +++ b/.github/workflows/nightly_snapshot_check.yml @@ -8,7 +8,7 @@ env: SWIFTLY_BOOTSTRAP_VERSION: 1.0.0 jobs: - tests-selfhosted: + tests-selfhosted-linux: name: Test (Smoke Test - Nightly Swift Toolchain) / ${{ matrix.container }} runs-on: ubuntu-latest strategy: @@ -27,7 +27,7 @@ jobs: # UBI 9 - See https://github.com/swiftlang/swift/issues/80909 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' - tests-selfhosted: + tests-selfhosted-macos: name: Test (Smoke Test - Nightly Swift Toolchain) / macOS Sequoia ARM64 runs-on: [self-hosted, macos, sequoia, ARM64] steps: From 5de9c9a5fcd230cdadfb1c83d4cf1d0afe1de671 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 17:17:22 -0400 Subject: [PATCH 12/15] Fix the artifact upload --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f1f8f8a5..72c0ed22 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -77,7 +77,7 @@ jobs: - name: Upload Tests uses: actions/upload-artifact@v4 with: - name: swiftly-tests-x86_64 + name: test-swiftly-linux-x86_64 path: .build/debug/test-swiftly-linux-x86_64.tar.gz if-no-files-found: error retention-days: 1 @@ -102,8 +102,8 @@ jobs: - name: Upload Tests uses: actions/upload-artifact@v4 with: - name: swiftly-tests-darwin - path: .build/debug/test-swiftly-macos.tar.gz + name: test-swiftly-macos + path: .build/release/test-swiftly-macos.tar.gz if-no-files-found: error retention-days: 1 From c92441c93734e5b19f7e133ca69b23a1cf206a47 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 22 May 2025 21:27:03 -0400 Subject: [PATCH 13/15] Fix the artifact name for test-swiftly --- .github/workflows/pull_request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 72c0ed22..6b28c1b9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -131,7 +131,7 @@ jobs: - name: Download Tests uses: actions/download-artifact@v4 with: - name: swiftly-tests-x86_64 + name: test-swiftly-linux-x86_64 - name: Extract and Run Workflow Tests 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 @@ -151,7 +151,7 @@ jobs: - name: Download Tests uses: actions/download-artifact@v4 with: - name: swiftly-tests-x86_64 + name: test-swiftly-linux-x86_64 - name: Extract and Run Workflow Tests 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 From 8abccba5848b5a00567cd673aaa39089291e3f8c Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Fri, 23 May 2025 11:41:25 -0400 Subject: [PATCH 14/15] Use the built-in swiftly on macOS builders --- .github/workflows/build_release.yml | 6 +++--- .github/workflows/nightly_snapshot_check.yml | 8 +++++--- .github/workflows/pull_request.yml | 12 ++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index e03ec3dd..a1a49641 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -51,10 +51,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Prepare the action - run: ./scripts/prep-gh-action.sh --install-swiftly + - name: Activate Swiftly + run: source /opt/swiftly/env.sh - name: Build Release Artifact - run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} + run: swiftly run swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} - name: Upload Release Artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/nightly_snapshot_check.yml b/.github/workflows/nightly_snapshot_check.yml index be05bba3..8fd939d3 100644 --- a/.github/workflows/nightly_snapshot_check.yml +++ b/.github/workflows/nightly_snapshot_check.yml @@ -33,7 +33,9 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Prepare the action - run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot + - name: Activate Swiftly + run: source /opt/swiftly/env.sh + - name: Install Main Snapshot + run: swiftly install main-snapshot - name: Build and Test - run: swift test + run: swiftly run +main-snapshot swift test diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 6b28c1b9..2de0bea6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -30,10 +30,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Prepare the action - run: ./scripts/prep-gh-action.sh --install-swiftly + - name: Activate Swiftly + run: source /opt/swiftly/env.sh - name: Build and Test - run: swift test + run: swiftly run swift test timeout-minutes: 60 tests-selfhosted: @@ -88,10 +88,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Prepare the action - run: ./scripts/prep-gh-action.sh --install-swiftly + - name: Activate Swiftly + run: source /opt/swiftly/env.sh - name: Build Artifact - run: swift run build-swiftly-release --test --skip "999.0.0" + run: swiftly run swift run build-swiftly-release --test --skip "999.0.0" - name: Upload Artifact uses: actions/upload-artifact@v4 with: From be9ccb8541c388b39d6e6fba7b09196f0fcca27f Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Fri, 23 May 2025 11:46:21 -0400 Subject: [PATCH 15/15] Revert "Use the built-in swiftly on macOS builders" This reverts commit 8abccba5848b5a00567cd673aaa39089291e3f8c. --- .github/workflows/build_release.yml | 6 +++--- .github/workflows/nightly_snapshot_check.yml | 8 +++----- .github/workflows/pull_request.yml | 12 ++++++------ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index a1a49641..e03ec3dd 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -51,10 +51,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Activate Swiftly - run: source /opt/swiftly/env.sh + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly - name: Build Release Artifact - run: swiftly run swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} + run: swift run build-swiftly-release ${{ inputs.skip }} ${{ inputs.version }} - name: Upload Release Artifact uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/nightly_snapshot_check.yml b/.github/workflows/nightly_snapshot_check.yml index 8fd939d3..be05bba3 100644 --- a/.github/workflows/nightly_snapshot_check.yml +++ b/.github/workflows/nightly_snapshot_check.yml @@ -33,9 +33,7 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Activate Swiftly - run: source /opt/swiftly/env.sh - - name: Install Main Snapshot - run: swiftly install main-snapshot + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly --swift-main-snapshot - name: Build and Test - run: swiftly run +main-snapshot swift test + run: swift test diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2de0bea6..6b28c1b9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -30,10 +30,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Activate Swiftly - run: source /opt/swiftly/env.sh + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly - name: Build and Test - run: swiftly run swift test + run: swift test timeout-minutes: 60 tests-selfhosted: @@ -88,10 +88,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - - name: Activate Swiftly - run: source /opt/swiftly/env.sh + - name: Prepare the action + run: ./scripts/prep-gh-action.sh --install-swiftly - name: Build Artifact - run: swiftly run swift run build-swiftly-release --test --skip "999.0.0" + run: swift run build-swiftly-release --test --skip "999.0.0" - name: Upload Artifact uses: actions/upload-artifact@v4 with: