Skip to content

Minimum Swift 6 Support #1310

Minimum Swift 6 Support

Minimum Swift 6 Support #1310

Workflow file for this run

name: Build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
swift-test:
strategy:
matrix:
include:
- os: macos-13 # TODO: macos-14 runner expected in October-December 2023
swift_version: "5.9"
xcode: /Applications/Xcode_15.0.app/Contents/Developer
- os: ubuntu-22.04
swift_version: "5.9"
name: Build on ${{ matrix.os }} with Swift ${{ matrix.swift_version }}
timeout-minutes: 40
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: swift-actions/setup-swift@v1
if: ${{ !startsWith(matrix.os, 'macos') }}
with:
swift-version: ${{ matrix.swift_version }}
- name: Select Xcode version
if: startsWith(matrix.os, 'macos')
run: sudo xcode-select --switch ${{ matrix.xcode }}
- name: Install dependencies for macOS
run: brew bundle
if: startsWith(matrix.os, 'macos')
- name: Install dependencies for Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: |
curl https://get.wasmer.io -sSfL | sh
- name: Build the project
run: |
swift -v
swift build
- name: Build and install JavaScript and sanitizer resources
run: |
set -ex
npm install
swift run carton-release hash-archive
mkdir -p $HOME/.carton
cp -r static $HOME/.carton
- name: Run Tests
run: |
set -ex
if [ -e /home/runner/.wasmer/wasmer.sh ]; then
source /home/runner/.wasmer/wasmer.sh
fi
swift test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}