|
7 | 7 | branches: [main]
|
8 | 8 |
|
9 | 9 | jobs:
|
10 |
| - swift-test: |
| 10 | + swift-test-macos: |
| 11 | + name: Build and test on macOS with Swift ${{ matrix.swift_version }} |
| 12 | + timeout-minutes: 40 |
| 13 | + runs-on: macos-13 |
11 | 14 | strategy:
|
12 | 15 | matrix:
|
13 | 16 | include:
|
14 | 17 | - os: macos-13 # TODO: macos-14 runner expected in October-December 2023
|
15 | 18 | swift_version: "5.9"
|
16 | 19 | xcode: /Applications/Xcode_15.0.app/Contents/Developer
|
17 |
| - - os: ubuntu-22.04 |
18 |
| - swift_version: "5.9" |
19 |
| - name: Build on ${{ matrix.os }} with Swift ${{ matrix.swift_version }} |
20 |
| - timeout-minutes: 40 |
21 |
| - runs-on: ${{ matrix.os }} |
22 | 20 |
|
23 | 21 | steps:
|
24 | 22 | - uses: actions/checkout@v4
|
25 |
| - - uses: swift-actions/setup-swift@v1 |
26 |
| - if: ${{ !startsWith(matrix.os, 'macos') }} |
27 |
| - with: |
28 |
| - swift-version: ${{ matrix.swift_version }} |
29 | 23 |
|
30 | 24 | - name: Select Xcode version
|
31 |
| - if: startsWith(matrix.os, 'macos') |
32 | 25 | run: sudo xcode-select --switch ${{ matrix.xcode }}
|
33 | 26 |
|
34 | 27 | - name: Install dependencies for macOS
|
35 | 28 | run: brew bundle
|
36 |
| - if: startsWith(matrix.os, 'macos') |
37 |
| - |
38 |
| - - name: Install dependencies for Ubuntu |
39 |
| - if: startsWith(matrix.os, 'ubuntu') |
40 |
| - run: sudo apt-get install wabt binaryen -y |
41 | 29 |
|
42 | 30 | - uses: bytecodealliance/actions/wasmtime/setup@v1
|
43 | 31 |
|
|
58 | 46 | run: swift test
|
59 | 47 | env:
|
60 | 48 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 49 | + |
| 50 | + swift-test-linux: |
| 51 | + name: Build and test on Linux with Swift ${{ matrix.swift_version }} |
| 52 | + timeout-minutes: 40 |
| 53 | + runs-on: ubuntu-22.04 |
| 54 | + container: swift:${{ matrix.swift_version }} |
| 55 | + strategy: |
| 56 | + matrix: |
| 57 | + include: |
| 58 | + - swift_version: "5.9" |
| 59 | + |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@v4 |
| 62 | + - name: Install dependencies for Ubuntu |
| 63 | + run: apt-get update && apt-get install wabt binaryen -y |
| 64 | + |
| 65 | + - uses: bytecodealliance/actions/wasmtime/setup@v1 |
| 66 | + |
| 67 | + - uses: actions/setup-node@v2 |
| 68 | + with: |
| 69 | + node-version: '20' |
| 70 | + - run: swift build |
| 71 | + - run: swift test |
| 72 | + env: |
| 73 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments