-
Notifications
You must be signed in to change notification settings - Fork 5
120 lines (118 loc) · 3.93 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Build and Test
on: push
jobs:
build-cse:
strategy:
fail-fast: false
matrix:
include:
- os: windows
os_ver: "2022"
config: Release
arch: "32"
compiler: msvc
experimental: false
- os: windows
os_ver: "2022"
config: Release
arch: "64"
compiler: msvc
experimental: false
# - os: windows
# os_ver: "2022"
# config: Release
# arch: "64"
# compiler: clang
# experimental: true
- os: macos
os_ver: "13"
config: Release
arch: "64"
compiler: clang
experimental: true
# - os: ubuntu
# os_ver: "22.04"
# config: Release
# arch: "64"
# compiler: gcc
# experimental: true
defaults:
run:
shell: bash
name: ${{ matrix.os }}-${{ matrix.os_ver }}-${{ matrix.compiler }}-${{ matrix.arch }}bit ${{ matrix.config }}
runs-on: ${{ matrix.os }}-${{ matrix.os_ver }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Get number of CPU cores # Can replace when CMake is upgraded to 3.29
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Build CSE
uses: ./.github/actions/build-cse
with:
arch: ${{ matrix.arch }}
config: ${{ matrix.config }}
compiler: ${{ matrix.compiler }}
- name: Build cse_tests.exe (unit tests)
run: cmake -DBUILD_ARCHITECTURE=${{ matrix.arch }} -DCONFIGURATION=${{ matrix.config }} -DTARGET_NAME=cse_tests -DBUILD_DIRECTORY=build -P cmake/build.cmake
- name: Upload executable artifact
uses: actions/upload-artifact@v4
with:
name: CSE_${{ matrix.os }}-${{ matrix.os_ver }}-${{ matrix.arch }}bit_${{ matrix.config }}
path: |
build/CSE*
build/cse*
- name: Build wcmp executable
run: cmake -DBUILD_ARCHITECTURE=${{ matrix.arch }} -DCONFIGURATION=${{ matrix.config }} -DTARGET_NAME=wcmp -DBUILD_DIRECTORY=build -P cmake/build.cmake
# - name: Setup Mesa3D
# uses: bigladder/github-actions/setup-mesa3d@main
# with:
# install-directory: msvc
- name: Test
id: test
run: ctest -C ${{ matrix.config }} -j ${{ steps.cpu-cores.outputs.count }} --output-on-failure -E shadetest # CI can't do GPU calcs at this time (the steps above get us close, but throws an exception on destruction)
working-directory: build
continue-on-error: true
- name: Upload report files artifact
if: steps.test.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: Reports-${{ matrix.os }}-${{ matrix.os_ver }}-${{ matrix.arch }}bit_${{ matrix.config }}
path: |
test/*.rep
test/*.REP
- name: Check test failure
if: steps.test.outcome == 'failure'
run: exit 1
build-doc:
strategy:
fail-fast: false
name: Build CSE documentation
needs: build-cse
if: ${{ always() }}
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure CMake
run: cmake -P cmake/configure.cmake
- name: Download CSE artifact
uses: ./.github/actions/download-cse-artifact
- name: Build docs
uses: ./.github/actions/build-docs
- name: Run coverage check
run: rake coverage
working-directory: doc
env:
CSE_EXE_PATH: ..\\build\\CSE.exe
- name: Upload documentation
uses: actions/upload-artifact@v4
with:
name: Documentation
path: |
doc/output
!doc/output/.git