-
-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (50 loc) · 1.88 KB
/
build_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
name: Build & Test ScribbleLab
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
os: [macOS, iOS]
configuration: [Alpha, Beta, Debug, Release]
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Select Xcode version
run: sudo xcode-select --switch /Applications/Xcode_16.app/Contents/Developer
- name: Build project using Matrix build system
run: |
if [ "${{ matrix.os }}" == "iOS" ]; then
xcodebuild -scheme ScribbleLab -configuration ${{ matrix.configuration }} \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" \
build | xcpretty | tee build.log
else
xcodebuild -scheme ScribbleLab -configuration ${{ matrix.configuration }} \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" \
build | xcpretty | tee build.log
fi
echo "AUTOGENERATED BUILD.LOG VIA TEE:"
cat build.log
if [ $? -ne 0 ]; then
echo "Build failed with non-zero exit code - Review the logs above"
exit 1
fi
- name: Run Tests
run: |
if [ "${{ matrix.os }}" == "iOS" ]; then
xcodebuild test -scheme ScribbleLab -configuration ${{ matrix.configuration }} \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" \
| xcpretty | tee test.log
else
xcodebuild test -scheme ScribbleLab -configuration ${{ matrix.configuration }} \
CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGN_ENTITLEMENTS="" \
| xcpretty | tee test.log
fi
echo "AUTOGENERATED TEST.LOG VIA TEE:"
cat test.log