-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.86 KB
/
c-cpp.yml
File metadata and controls
72 lines (61 loc) · 1.86 KB
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
name: C/C++ CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
build_type: [Release]
runs-on: ${{ matrix.os }}
env:
BUILD_TYPE: ${{ matrix.build_type }}
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Config MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install ninja (Windows)
if: runner.os == 'Windows'
run: choco install -y ninja
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10.X'
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Install python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
cmake -S . -B build -G Ninja `
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
-DBUILD_TESTING=ON `
-DBUILD_TESTS=ON `
-DPROXY_ENABLE_LOG=ON `
-DPROXY_LINK_MAP=ON `
-DBUILD_LOADER=ON
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }} -- -k 0
- name: Tests
working-directory: build
run: ctest -C ${{ env.BUILD_TYPE }}
- name: Upload build & tests logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.os }}-${{ env.BUILD_TYPE }}
path: |
build/Testing/Temporary/LastTest.log
build/CMakeFiles/CMakeOutput.log
build/CMakeFiles/CMakeError.log
if-no-files-found: ignore