-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (50 loc) · 1.81 KB
/
build.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
name: build
on: [pull_request, push]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
- uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-6.0.2-release
tag: 6.0.2-RELEASE
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: dotnet tool install --global wix --version 5.0.0
- run: ./gradlew :windows:copyJniHeaders
- run: ./gradlew build
- uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
test:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: microsoft/[email protected]
with:
msbuild-architecture: x64
- uses: compnerd/gha-setup-swift@main
with:
branch: swift-6.0.2-release
tag: 6.0.2-RELEASE
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: ./gradlew :windows:copyJniHeaders
# Patch to fix building Foundation on Windows with c++ interop, remove in Swift 6.1
- run: (Get-Content -Raw -Path "$env:LOCALAPPDATA\Programs\Swift\Platforms\6.0.2\Windows.platform\Developer\SDKs\Windows.sdk\usr\share\ucrt.modulemap") -replace "module complex \{[\s\S]*?\}", "module complex {`n }" | Set-Content -Path "$env:LOCALAPPDATA\Programs\Swift\Platforms\6.0.2\Windows.platform\Developer\SDKs\Windows.sdk\usr\share\ucrt.modulemap"
- name: Swift build
working-directory: ./windows
run: swift build
- name: Swift test
working-directory: ./windows
run: swift test --disable-xctest