Skip to content

Commit

Permalink
Add Swift 6.0 to CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Nov 2, 2024
1 parent 64e2e11 commit 9c09ded
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 61 deletions.
19 changes: 6 additions & 13 deletions .github/actions/install-swift/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: 'Install Swift toolchain'
description: 'Install Swift toolchain tarball from URL'
inputs:
swift-dir:
description: The directory name part of the distribution URL
required: true
swift-version:
description: Git tag indicating the Swift version
download-url:
description: 'URL to download Swift toolchain tarball'
required: true

runs:
Expand Down Expand Up @@ -33,12 +32,6 @@ runs:
zlib1g-dev
curl
- name: Download Swift
shell: bash
run: curl -fLO https://download.swift.org/${{ inputs.swift-dir }}/${{ inputs.swift-version }}/${{ inputs.swift-version }}-ubuntu22.04.tar.gz
working-directory: ${{ env.RUNNER_TEMP }}

- name: Unarchive and Install Swift
- name: Install Swift
shell: bash
run: sudo tar -xf ${{ inputs.swift-version }}-ubuntu22.04.tar.gz --strip-components=2 -C /usr/local
working-directory: ${{ env.RUNNER_TEMP }}
run: curl -fL ${{ inputs.download-url }} | sudo tar -xfz - --strip-components=2 -C /usr/local
22 changes: 16 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,33 @@ jobs:
- { os: ubuntu-20.04, toolchain: wasm-5.9.1-RELEASE, wasi-backend: MicroWASI }
- { os: ubuntu-20.04, toolchain: wasm-5.10.0-RELEASE, wasi-backend: MicroWASI }
- os: ubuntu-22.04
toolchain: DEVELOPMENT-SNAPSHOT-2024-06-13-a
toolchain:
download-url: https://download.swift.org/swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE-ubuntu22.04.tar.gz
swift-sdk:
id: 6.0-SNAPSHOT-2024-10-29-a-wasm32-unknown-wasi
download-url: "https://github.com/swiftwasm/swift/releases/download/swift-wasm-6.0-SNAPSHOT-2024-10-29-a/swift-wasm-6.0-SNAPSHOT-2024-10-29-a-wasm32-unknown-wasi.artifactbundle.zip"
checksum: "434ce886e3e7a3ce56b2dd3b8cb7421810546a7b6305ccf39c130b4cb68de929"
wasi-backend: Node
- os: ubuntu-22.04
toolchain:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a/swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a-ubuntu22.04.tar.gz
swift-sdk:
id: DEVELOPMENT-SNAPSHOT-2024-06-14-a-wasm32-unknown-wasi
download-url: "https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-06-14-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-06-14-a-wasm32-unknown-wasi.artifactbundle.zip"
checksum: "da96c0f3fb93b4cf2c7d4768d46413ad96f5f81053c6fcc5218f642be302da81"
wasi-backend: Node
- os: ubuntu-22.04
toolchain: DEVELOPMENT-SNAPSHOT-2024-06-13-a
toolchain:
download-url: https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a/swift-DEVELOPMENT-SNAPSHOT-2024-06-13-a-ubuntu22.04.tar.gz
swift-sdk:
id: DEVELOPMENT-SNAPSHOT-2024-06-14-a-wasm32-unknown-wasip1-threads
download-url: "https://github.com/swiftwasm/swift/releases/download/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-06-14-a/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-06-14-a-wasm32-unknown-wasip1-threads.artifactbundle.zip"
checksum: "da96c0f3fb93b4cf2c7d4768d46413ad96f5f81053c6fcc5218f642be302da81"
wasi-backend: Node

runs-on: ${{ matrix.entry.os }}
env:
JAVASCRIPTKIT_WASI_BACKEND: ${{ matrix.entry.wasi-backend }}
SWIFT_VERSION: ${{ matrix.entry.toolchain }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -52,12 +63,11 @@ jobs:
- uses: ./.github/actions/install-swift
if: ${{ matrix.entry.swift-sdk }}
with:
swift-dir: development/ubuntu2204
swift-version: swift-${{ matrix.entry.toolchain }}
download-url: ${{ matrix.entry.toolchain.download-url }}
- name: Install Swift SDK
if: ${{ matrix.entry.swift-sdk }}
run: |
swift sdk install "${{ matrix.entry.swift-sdk.download-url }}"
swift sdk install "${{ matrix.entry.swift-sdk.download-url }}" --checksum "${{ matrix.entry.swift-sdk.checksum }}"
echo "SWIFT_SDK_ID=${{ matrix.entry.swift-sdk.id }}" >> $GITHUB_ENV
- run: make bootstrap
- run: make test
Expand Down
42 changes: 0 additions & 42 deletions scripts/install-toolchain.sh

This file was deleted.

0 comments on commit 9c09ded

Please sign in to comment.