Skip to content

Commit 8109fd9

Browse files
committed
CI: run tests with debug build as well, so stack trace is useful
1 parent f1bec0b commit 8109fd9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ name: Build
22

33
on: [ push, pull_request ]
44

5-
env:
6-
BUILD_TYPE: Release
7-
85
jobs:
96
build:
107
runs-on: ${{ matrix.os }}
118
strategy:
129
matrix:
1310
os: [ windows-latest, ubuntu-latest, macos-latest ]
11+
build_type: [ Debug, RelWithDebInfo ]
1412

1513
steps:
1614
- uses: actions/checkout@v2
@@ -47,7 +45,7 @@ jobs:
4745
- name: Configure CMake
4846
shell: bash
4947
working-directory: ${{runner.workspace}}/build
50-
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH="$LLVMDIR" -DCMAKE_UNITY_BUILD=OFF
48+
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_PREFIX_PATH="$LLVMDIR" -DCMAKE_UNITY_BUILD=OFF
5149

5250
- name: install DIA SDK # Workaround for https://github.com/llvm/llvm-project/issues/86250
5351
if: runner.os == 'Windows'
@@ -60,7 +58,7 @@ jobs:
6058
- name: Build
6159
working-directory: ${{runner.workspace}}/build
6260
shell: bash
63-
run: cmake --build . --config $BUILD_TYPE
61+
run: cmake --build . --config ${{ matrix.build_type }}
6462

6563
- name: Test
6664
working-directory: ${{runner.workspace}}/build
@@ -75,7 +73,7 @@ jobs:
7573
brew install sdl2 glfw3
7674
fi
7775
# Tests depending on SDL2 or GLFW are disabled on Windows CI.
78-
CX_PRINT_STACK_TRACE=true cmake --build . --config $BUILD_TYPE --target check
76+
CX_PRINT_STACK_TRACE=true cmake --build . --config ${{ matrix.build_type }} --target check
7977
8078
deploy-website:
8179
if: github.repository == 'cx-language/cx' && github.ref == 'refs/heads/main'

0 commit comments

Comments
 (0)