forked from openscad/openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (140 loc) · 4.3 KB
/
manual.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: manual
on:
workflow_dispatch:
inputs:
build_type:
type: choice
description: 'Build type'
options:
- Release
- Debug
required: true
default: Release
variant:
type: choice
description: 'Variant'
options:
- GUI
- Headless
- NULLGL
- WASM
required: true
default: GUI
compiler:
type: choice
description: 'Compiler'
options:
- gcc
- clang
required: true
default: gcc
enable_experimental:
type: boolean
description: 'Experimental'
required: false
default: true
use_mimalloc:
type: boolean
description: 'Use mimalloc'
required: false
default: true
enable_msan:
type: boolean
description: 'Enable MSAN'
required: false
default: false
enable_asan:
type: boolean
description: 'Enable ASAN'
required: false
default: false
enable_tsan:
type: boolean
description: 'Enable TSAN'
required: false
default: false
enable_ubsan:
type: boolean
description: 'Enable UBSAN'
required: false
default: false
use_builtin_opencsg:
type: boolean
description: 'Use built-in OpenCSG'
required: false
default: false
gl_wrangler:
type: choice
description: 'OpenGL Wrangler'
options:
- GLEW
- GLAD
required: true
default: GLEW
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Inputs
run: echo "${{ toJSON(inputs) }}"
- name: Select compiler
run: |
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
echo "LD=lld" >> $GITHUB_ENV
if: ${{ inputs.compiler == 'clang' }}
- name: Select variant
run: |
case ${{ inputs.variant }} in
Headless) echo "CMAKE_EXTRA=-DHEADLESS=1" >> $GITHUB_ENV ;;
NULLGL) echo "CMAKE_EXTRA=-DNULLGL=1" >> $GITHUB_ENV ;;
WASM) echo "CMAKE_EXTRA=-DWASM=1" >> $GITHUB_ENV ;;
esac
- name: Select OpenGL wrangler
run: |
echo "CMAKE_EXTRA=-DUSE_GLAD=1" >> $GITHUB_ENV ;;
if: ${{ inputs.gl_wrangler == 'GLAD' }}
- uses: kenchan0130/actions-system-info@master
id: system-info
- name: Print System Info
run: |
OUTPUTS=(
"CPU Core: ${{ steps.system-info.outputs.cpu-core }}"
"CPU Model: ${{ steps.system-info.outputs.cpu-model }}"
"Hostname: ${{ steps.system-info.outputs.hostname }}"
"Kernel release: ${{ steps.system-info.outputs.kernel-release }}"
"Kernel version: ${{ steps.system-info.outputs.kernel-version }}"
"Name: ${{ steps.system-info.outputs.name }}"
"Platform: ${{ steps.system-info.outputs.platform }}"
"Release: ${{ steps.system-info.outputs.release }}"
"Total memory bytes: ${{ steps.system-info.outputs.totalmem }}"
)
for OUTPUT in "${OUTPUTS[@]}";do
echo "${OUTPUT}"
done
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install dependencies
run: ./scripts/github-ci-linux-get-dependencies.sh kinetic
- name: Dependency fixup
run: sudo apt-get install gettext
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build
run: |
cmake ${CMAKE_EXTRA} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DEXPERIMENTAL=${{ inputs.enable_experimental }} -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} -DSANITIZE_MEMORY=${{ inputs.enable_msan }} -DSANITIZE_ADDRESS=${{ inputs.enable_asan }} -DSANITIZE_THREAD=${{ inputs.enable_tsan }} -DSANITIZE_UNDEFINED=${{ inputs.enable_ubsan }} -DUSE_BUILTIN_OPENCSG=${{ inputs.use_builtin_opencsg }} -B b .
cmake --build b -j 2
echo "Build exit code: $?"
- name: Test
run: ./scripts/github-ci.sh test
if: ${{ ! inputs.enable_wasm }}
- name: Upload Test Result Report
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: Test Result Report (${{ matrix.os }})
path: |
b/Testing/Temporary/*_report.html
b/Testing/Temporary/LastTest.log