This repository has been archived by the owner on Jan 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
89 lines (71 loc) · 2.21 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
---
name: Build and test
"on":
push:
branches: [main]
pull_request:
branches: ["**"]
jobs:
devcontainer:
name: "Devcontainer: ${{ matrix.os }}/${{ matrix.configuration }}"
strategy:
matrix:
os: [ubuntu-latest]
configuration: [debug]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Build and Test
uses: devcontainers/[email protected]
with:
runCmd: swift test --explicit-target-dependency-import-check=error -c ${{ matrix.configuration }}
xcode:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Build and Test
run: xcrun xcodebuild -skipPackagePluginValidation -scheme Lotsawa -destination 'platform=macOS' test
native:
name: "Native: ${{ matrix.os }}/${{ matrix.configuration }}"
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
configuration: [debug]
include:
# Default values to add
- shell: 'bash -eo pipefail {0}'
- build-options: '--explicit-target-dependency-import-check=error'
# Overrides for the defaults
- shell: pwsh
os: windows-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
show-progress: false
- name: Setup Swift (Unices)
if: ${{ matrix.os != 'windows-latest' }}
uses: 'swift-actions/setup-swift@v1'
with:
version: 5.9
- name: Setup Swift (Windows)
if: ${{ matrix.os == 'windows-latest' }}
uses: 'compnerd/gha-setup-swift@main'
with:
github-repo: thebrowsercompany/swift-build
release-asset-name: installer-amd64.exe
release-tag-name: 20231010.3
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Test (${{ matrix.configuration }})
run: >
swift test -c ${{ matrix.configuration }} ${{ matrix.build-options }}
--explicit-target-dependency-import-check=error