-
Notifications
You must be signed in to change notification settings - Fork 23
48 lines (43 loc) · 1.69 KB
/
ubuntu-2204.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: "Ubuntu 22.04 (gcc + clang)"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
CMAKE_BUILD_TYPE: Debug
NUM_BUILD_JOBS: 2
jobs:
configure_build_test_with_clang:
name: "Install, configure, build and test with clang"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: apt update
run: sudo apt-get update
- name: Install dependencies for apps with a GUI
run: sudo apt-get install pkg-config libwxgtk3.0-gtk3-dev
- name: Configure
run: CC=clang CXX=clang++ cmake -B ${{github.workspace}}/build-clang -DCMAKE_BUILD_TYPE:STRING=${{env.CMAKE_BUILD_TYPE}} -DFORCE_BUILDING_ALL_APPS:BOOL=ON
- name: Build
run: cmake --build ${{github.workspace}}/build-clang --config ${{env.CMAKE_BUILD_TYPE}} -- -j${{env.NUM_BUILD_JOBS}}
- name: Test
working-directory: ${{github.workspace}}/build-clang
run: ctest -C ${{env.CMAKE_BUILD_TYPE}}
configure_build_test_with_gcc:
name: "Install, configure, build and test with gcc"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: apt update
run: sudo apt-get update
- name: Install dependencies for apps with a GUI
run: sudo apt-get install pkg-config libwxgtk3.0-gtk3-dev
- name: Configure
run: CC=gcc CXX=g++ cmake -B ${{github.workspace}}/build-gcc -DCMAKE_BUILD_TYPE:STRING=${{env.CMAKE_BUILD_TYPE}} -DFORCE_BUILDING_ALL_APPS:BOOL=ON
- name: Build
run: cmake --build ${{github.workspace}}/build-gcc --config ${{env.CMAKE_BUILD_TYPE}} -- -j${{env.NUM_BUILD_JOBS}}
- name: Test
working-directory: ${{github.workspace}}/build-gcc
run: ctest -C ${{env.CMAKE_BUILD_TYPE}}