Skip to content

Commit 74b5b81

Browse files
authored
GHA: add initial workflow for building the package in CI
Introduce CI coverage for the package across all the major platforms. This should ensure that we do not accidentally regress the package on various platforms.
1 parent 57e2434 commit 74b5b81

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
test:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
include:
13+
- os: ubuntu-latest
14+
swift-version: swift-6.1.2-release
15+
swift-build: 6.1.2-RELEASE
16+
build-args: "--traits GNU"
17+
18+
- os: macos-latest
19+
swift-version: swift-6.1.2-release
20+
swift-build: 6.1.2-RELEASE
21+
build-args: ""
22+
23+
- os: windows-latest
24+
swift-version: swift-6.1.2-release
25+
swift-build: 6.1.2-RELEASE
26+
build-args: ""
27+
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: Setup Swift
35+
uses: compnerd/gha-setup-swift@main
36+
with:
37+
swift-version: ${{ matrix.swift-version }}
38+
swift-build: ${{ matrix.swift-build }}
39+
update-sdk-modules: true
40+
41+
- if: matrix.os == 'ubuntu-latest'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install -y libunistring-dev
45+
46+
- name: Show Swift version
47+
run: swift --version
48+
49+
- name: Resolve dependencies
50+
run: swift package resolve
51+
52+
- name: Build
53+
run: swift build --configuration debug ${{ matrix.build-args }}

0 commit comments

Comments
 (0)