-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (87 loc) · 2.44 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build & Test
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
jobs:
spm-support:
name: SPM - Support Module
runs-on: windows-2022
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-swift
- name: Build support module
shell: pwsh
run: swift build --verbose --build-tests
- name: Test support module
shell: pwsh
run: swift test --verbose --skip-build
spm-generator-and-interoptests:
name: SPM - Generator and InteropTests
runs-on: windows-2022
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-swift
- name: Build code generator
working-directory: Generator
shell: pwsh
run: swift build --verbose --build-tests
- name: Test code generator
working-directory: Generator
shell: pwsh
run: swift test --verbose --skip-build
- name: Build WinRTComponent
working-directory: InteropTests
shell: pwsh
run: |
& .\SPMPrebuild.ps1 -SwiftWinRT "$Env:GITHUB_WORKSPACE\Generator\.build\debug\SwiftWinRT.exe"
- name: Build InteropTests
working-directory: InteropTests
shell: pwsh
run: swift build --verbose --build-tests
- name: Run InteropTests
working-directory: InteropTests
shell: pwsh
run: swift test --verbose --skip-build
cmake:
name: CMake - All (No Tests)
runs-on: windows-2022
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-swift
- name: CMake Configure
shell: pwsh
run: cmake --preset debug `
-D CMAKE_EXPORT_COMPILE_COMMANDS=OFF
- name: CMake Build
shell: pwsh
run: cmake --build --preset debug
json-schema:
name: JSON Schema
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Test Schema
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
Test-Json `
-Path InteropTests\WinRTComponent\Projection.json `
-SchemaFile Generator\Projection.schema.json
required:
name: Go/No-Go
runs-on: ubuntu-latest
needs: [spm-support, spm-generator-and-interoptests, cmake, json-schema]
if: always()
steps:
- name: Fail if any required job failed
if: contains(needs.*.result, 'failure')
run: exit 1