-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.62 KB
/
macos-ci.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
name: MacOS Build and Test
on:
workflow_dispatch:
jobs:
build-and-test:
runs-on: macos-latest
defaults:
run:
working-directory: ./
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Building with Python script
run: python build.py
- name: Check 'SpaceEngine' library build success
run: |
if [ -e build/core/libSpaceEngine.a ]; then
echo "SpaceEngine library exists."
else
echo "SpaceEngine library not found. Failing the CI test."
exit 1
fi
- name: Check 'SpaceEditor' executable build success
run: |
if [ -e build/editor/SpaceEditor ]; then
echo "SpaceEditor executable exists."
else
echo "SpaceEditor executable not found. Failing the CI test."
exit 1
fi
- name: Check 'SpaceTests' executable build success
run: |
if [ -e build/tests/SpaceTests ]; then
echo "SpaceTests executable exists."
else
echo "SpaceTests executable not found. Failing the CI test."
exit 1
fi
- name: Run tests
run: |
cd build/tests
./SpaceTests > test_output.txt 2>&1
- name: Check test results
run: |
if grep -q "failed" build/tests/test_output.txt; then
echo "Tests failed."
exit 1
else
echo "Tests passed."
fi