-
Notifications
You must be signed in to change notification settings - Fork 9
105 lines (105 loc) · 4.56 KB
/
build-and-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Build and Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build-and-test:
runs-on: macos-latest
steps:
- name: 🐍 setup
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: ⬇️ sources
id: download-sources
uses: actions/checkout@v3
- name: 🏗️ project files
id: setup-project-files
continue-on-error: true
run: |
mkdir build
cd build
cmake -DTRACY_ENABLE=OFF -DORC_BUILD_EXAMPLES=0 -GXcode ..
- name: 🛠️ orc debug
id: build-orc-debug
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_orc -configuration Debug -hideShellScriptEnvironment
- name: 🏃 orc_dogfood
id: build-orc-orc_dogfood
continue-on-error: true
run: |
ORC_OUTPUT_FILE=./output.json ORC_OUTPUT_FILE_MODE=json xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_dogfood -configuration Debug -hideShellScriptEnvironment
cat output.json
if [ `cat output.json | jq '.["synopsis"]["violations"]'` == 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi
if [ `cat output.json | jq '.["synopsis"]["dies_skipped"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi
if [ `cat output.json | jq '.["synopsis"]["unique_symbols"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi
if [ `cat output.json | jq '.["synopsis"]["object_files_scanned"]'` != 0 ]; then echo "SUCCESS"; else echo "FAILURE"; exit 1; fi
- name: 🛠️ orc release
id: build-orc-release
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_orc -configuration Release -hideShellScriptEnvironment
- name: 🛠️ orc_test
id: build-orc_test
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -hideShellScriptEnvironment
- name: 🏃 orc_test
id: run-orc_test
continue-on-error: true
run: |
./build/Release/orc_test ./test/battery --json_mode > test_out.json
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json
- name: 🛠️ orc_test w/ ASan
id: build-orc_test-asan
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableAddressSanitizer YES -hideShellScriptEnvironment
- name: 🏃 orc_test w/ ASan
id: run-orc_test-asan
continue-on-error: true
run: |
./build/Release/orc_test ./test/battery --json_mode > test_out.json
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json
- name: 🛠️ orc_test w/ TSan
id: build-orc_test-tsan
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableThreadSanitizer YES -hideShellScriptEnvironment
- name: 🏃 orc_test w/ TSan
id: run-orc_test-tsan
continue-on-error: true
run: |
./build/Release/orc_test ./test/battery --json_mode > test_out.json
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json
- name: 🛠️ orc_test w/ UBSan
id: build-orc_test-ubsan
continue-on-error: true
run: |
xcodebuild -json -project ./build/orc.xcodeproj -scheme orc_test -configuration Release -enableUndefinedBehaviorSanitizer YES -hideShellScriptEnvironment
- name: 🏃 orc_test w/ UBSan
id: run-orc_test-ubsan
continue-on-error: true
run: |
./build/Release/orc_test ./test/battery --json_mode > test_out.json
python ${GITHUB_WORKSPACE}/.github/orc_test_to_github_actions.py test_out.json
- name: ✏️ github json
uses: jsdaniell/[email protected]
continue-on-error: true
with:
name: "github.json"
json: ${{ toJSON(github) }}
- name: ✏️ steps json
uses: jsdaniell/[email protected]
continue-on-error: true
with:
name: "steps.json"
json: ${{ toJSON(steps) }}
- name: ✍️ job summary
continue-on-error: false
run: |
python ${GITHUB_WORKSPACE}/.github/generate_job_summary.py $GITHUB_STEP_SUMMARY github.json steps.json