Generalize findSwiftExecutable
into findExecutable
#1362
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
swift-test-macos: | |
name: Build and test on macOS with Swift ${{ matrix.swift_version }} | |
timeout-minutes: 40 | |
runs-on: macos-13 | |
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 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Select Xcode version | |
run: sudo xcode-select --switch ${{ matrix.xcode }} | |
- name: Install dependencies for macOS | |
run: brew bundle | |
- uses: bytecodealliance/actions/wasmtime/setup@v1 | |
- 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: swift test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
swift-test-linux: | |
name: Build and test on Linux with Swift ${{ matrix.swift_version }} | |
timeout-minutes: 40 | |
runs-on: ubuntu-22.04 | |
container: swift:${{ matrix.swift_version }} | |
strategy: | |
matrix: | |
include: | |
- swift_version: "5.9" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies for Ubuntu | |
run: apt-get update && apt-get install wabt binaryen -y | |
- uses: bytecodealliance/actions/wasmtime/setup@v1 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '20' | |
- run: swift build | |
- run: swift test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |