Skip to content

Commit 096959c

Browse files
authored
Merge pull request #157 from p-x9/feature/setup-build-action
Build with CI when creating pull requests
2 parents 4ca5ffc + 6affbed commit 096959c

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- README.md
9+
- LICENSE
10+
pull_request:
11+
paths-ignore:
12+
- README.md
13+
- LICENSE
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
env:
20+
DEVELOPER_DIR: /Applications/Xcode_16.2.app
21+
22+
jobs:
23+
build:
24+
name: Build & Test
25+
runs-on: macos-15
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Select Xcode 16
31+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
32+
33+
- name: Build
34+
run: swift build
35+
36+
linux-build:
37+
name: Linux Test
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Install Swift
41+
# WORKAROUND:https://github.com/swift-actions/setup-swift/pull/680
42+
uses: swift-actions/setup-swift@bb83339d1e8577741bdc6c65ba551ce7dc0fb854
43+
with:
44+
swift-version: '5.10.1'
45+
46+
- uses: actions/checkout@v4
47+
48+
- name: Build
49+
run: swift build

0 commit comments

Comments
 (0)