forked from ridiculousfish/libdivide
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.21 KB
/
canary_build.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
name: Canary Build and Test
on:
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
build_type: Release
cpp_compiler: g++
output_folder: ${{github.workspace}}/build/
jobs:
Canary-Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure CMake & Build
env:
# Map from C++ compiler to equivalent C compiler
g++: gcc
clang++: clang
uses: threeal/[email protected]
with:
build-dir: ${{ env.output_folder }}
c-compiler: ${{ env[env.cpp_compiler] }}
cxx-compiler: ${{ env.cpp_compiler }}
build-args: -t tester
options: |
LIBDIVIDE_BUILD_TESTS=ON
CMAKE_BUILD_TYPE=${{ env.build_type }}
- name: Test
working-directory: ${{env.output_folder}}
run: ctest --build-config ${{env.build_type}} --verbose --tests-regex tester
# Kick off the full build if everything above succeeded
Full-Build:
needs: Canary-Build
uses: ./.github/workflows/full_build.yml
# Kick off the full build if everything above succeeded
AVR-Build:
needs: Canary-Build
uses: ./.github/workflows/avr_build_test.yml