Add swift_version matrix support for ubuntu

This commit is contained in:
STREGA 2023-10-01 05:17:34 -04:00 committed by Yuta Saito
parent 00a0315cab
commit 6726c74427
2 changed files with 24 additions and 11 deletions

View File

@ -11,10 +11,15 @@ jobs:
strategy: strategy:
matrix: matrix:
include: include:
- os: macos-13
swift_version: 5.8
xcode: /Applications/Xcode_14.3.app/Contents/Developer
- os: macos-13 # TODO: macos-14 runner expected in October-December 2023 - os: macos-13 # TODO: macos-14 runner expected in October-December 2023
swift_version: 5.9 swift_version: 5.9
xcode: /Applications/Xcode_15.0.app/Contents/Developer xcode: /Applications/Xcode_15.0.app/Contents/Developer
- os: ubuntu-20.04 - os: ubuntu-20.04
swift_version: 5.8
- os: ubuntu-22.04
swift_version: 5.9 swift_version: 5.9
name: Build on ${{ matrix.os }} with Swift ${{ matrix.swift_version }} name: Build on ${{ matrix.os }} with Swift ${{ matrix.swift_version }}
timeout-minutes: 40 timeout-minutes: 40
@ -40,6 +45,14 @@ jobs:
sudo ./install_ubuntu_deps.sh sudo ./install_ubuntu_deps.sh
curl https://get.wasmer.io -sSfL | sh curl https://get.wasmer.io -sSfL | sh
- name: Install Swift Version
if: startsWith(matrix.os, 'ubuntu')
run: |
curl -o swiftly-install.sh https://swift-server.github.io/swiftly/swiftly-install.sh
sudo chmod 775 swiftly-install.sh
./swiftly-install.sh --disable-confirmation
swiftly install ${{ matrix.swift_version }}
- name: Build the project - name: Build the project
run: | run: |
swift -v swift -v
@ -63,13 +76,13 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker_image: # docker_image:
runs-on: ubuntu-20.04 # runs-on: ubuntu-20.04
#
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
#
- name: Build a Docker image on Ubuntu 20.04 # - name: Build a Docker image on Ubuntu 20.04
run: docker build . -t ghcr.io/swiftwasm/swiftwasm-action:latest # run: docker build . -t ghcr.io/swiftwasm/swiftwasm-action:latest
env: # env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,4 +1,4 @@
// swift-tools-version:5.9 // swift-tools-version:5.8
// The swift-tools-version declares the minimum version of Swift required to build this package. // The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription import PackageDescription