-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (76 loc) · 2.44 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
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
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/setup-msbuild@v1.1
with:
msbuild-architecture: x64
- uses: compnerd/gha-setup-swift@main
with:
github-repo: thebrowsercompany/swift-build
github-token: ${{ secrets.GITHUB_TOKEN }}
release-tag-name: 20240422.2
release-asset-name: installer-amd64.exe
- 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/setup-msbuild@v1.1
with:
msbuild-architecture: x64
- uses: compnerd/gha-setup-swift@main
with:
github-repo: thebrowsercompany/swift-build
github-token: ${{ secrets.GITHUB_TOKEN }}
release-tag-name: 20240422.2
release-asset-name: installer-amd64.exe
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: ./gradlew :windows:copyJniHeaders
- name: Swift build
working-directory: ./windows
run: swift build
- name: Swift test
working-directory: ./windows
run: swift test --disable-xctest
format:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v1.1
with:
msbuild-architecture: x64
- uses: compnerd/gha-setup-swift@main
with:
github-repo: thebrowsercompany/swift-build
github-token: ${{ secrets.GITHUB_TOKEN }}
release-tag-name: 20240422.2
release-asset-name: installer-amd64.exe
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- run: ./gradlew :windows:copyJniHeaders
- name: Swift format
working-directory: ./windows
run: swift run swift-format format -r -p Sources/ Tests/
- name: Swift lint
working-directory: ./windows
run: swift run swift-format lint -r -p Sources/ Tests/