-
Notifications
You must be signed in to change notification settings - Fork 12
65 lines (63 loc) · 2.17 KB
/
build-linux.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: "Build on Linux"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.build_targets.image }}
strategy:
matrix:
build_config: [Debug, Release]
build_targets:
- image: mogemimi/gamedev-ubuntu
c_compiler: clang
cxx_compiler: clang++
cxx_flags: -stdlib=libc++
linker_flags: -stdlib=libc++ -lc++abi
cmake_flags: ""
- image: mogemimi/gamedev-ubuntu
c_compiler: clang
cxx_compiler: clang++
cxx_flags: -stdlib=libstdc++
linker_flags: -stdlib=libstdc++
cmake_flags: ""
- image: mogemimi/gamedev-archlinux
c_compiler: gcc
cxx_compiler: g++
cxx_flags: ""
linker_flags: ""
cmake_flags: ""
# - image: mogemimi/gamedev-ubuntu
# c_compiler: clang
# cxx_compiler: clang++
# cxx_flags: -stdlib=libc++
# linker_flags: -stdlib=libc++ -lc++abi
# cmake_flags: -DPOMDOG_USE_ADDRESS_SANITIZER=1
# - image: mogemimi/gamedev-ubuntu
# c_compiler: clang
# cxx_compiler: clang++
# cxx_flags: -stdlib=libc++
# linker_flags: -stdlib=libc++ -lc++abi
# cmake_flags: -DPOMDOG_USE_MEMORY_SANITIZER=1
steps:
- name: Check out repositry
uses: actions/checkout@v2
with:
submodules: 'recursive'
fetch-depth: 50
- name: Generate Ninja files
run: |
cmake -Bbuild/linux -H. -G Ninja ${{ matrix.build_targets.cmake_flags }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_config }} \
-DCMAKE_C_COMPILER=${{ matrix.build_targets.c_compiler }} \
-DCMAKE_CXX_COMPILER=${{ matrix.build_targets.cxx_compiler }} \
-DCMAKE_CXX_FLAGS="${{ matrix.build_targets.cxx_flags }}" \
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.build_targets.linker_flags }}"
- name: Build
run: ninja -C build/linux -k 20
- name: Run test
run: ./build/linux/test/pomdog_test