-
Notifications
You must be signed in to change notification settings - Fork 84
36 lines (33 loc) · 978 Bytes
/
cmake.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
name: ci_cmake
on:
workflow_dispatch:
push:
paths:
- "do.py"
- ".github/workflows/cmake.yml"
- "code-experiments/build/c/CMakeLists.txt"
- "code-experiments/src/**.c"
- "code-experiments/src/**.h"
pull_request:
branches: [ master, development ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
build_type: [Release, Debug]
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build C amalgamation
run: python ${{github.workspace}}/do.py amalgamate-c
- name: Configure CMake
run: cmake -S ${{github.workspace}}/code-experiments/build/c/ -B build/ -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
- name: Build
run: cmake --build build/ --config ${{matrix.build_type}}