-
Notifications
You must be signed in to change notification settings - Fork 12
74 lines (71 loc) · 2.84 KB
/
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
66
67
68
69
70
71
72
73
74
name: Linux
on: [pull_request]
jobs:
ubuntu-gcc:
runs-on: ubuntu-latest
env:
CMAKE_FLAGS: "-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON"
strategy:
matrix:
build-type: ["Release", "Debug"]
gcc-version: ["11"]
steps:
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: C++ Setting
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -yq g++-${{matrix.gcc-version}} gcc-${{matrix.gcc-version}} libc++-dev libc++abi-dev build-essential libstdc++-${{matrix.gcc-version}}-dev cmake
- name: Compiler Setting
run: |
echo "CC=gcc-${{matrix.gcc-version}}" >> $GITHUB_ENV
echo "CXX=g++-${{matrix.gcc-version}}" >> $GITHUB_ENV
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.build-type}} ${{env.CMAKE_FLAGS}} .
cd build
cmake --build . --config ${{matrix.build-type}}
- name: Run Test Script
run: |
cd build
ctest .
ubuntu-llvm:
runs-on: ubuntu-latest
env:
CMAKE_FLAGS: "-DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON -DSERDEPP_USE_RAPIDJSON=ON -DSERDEPP_USE_FMT=ON -DSERDEPP_BUILD_TESTING=ON -DSERDEPP_USE_CATCH2=ON"
strategy:
matrix:
build-type: ["Release", "Debug"]
clang-version: ["8"]
steps:
- name: ccache
uses: hendrikmuhs/ccache-action@v1
- name: C++ Setting
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-${{matrix.clang-version}} main"
sudo apt-get update
sudo apt-get install -yq clang-${{matrix.clang-version}} libc++-dev libc++abi-dev libstdc++-${{matrix.clang-version}}-dev build-essential cmake
- name: Compiler Setting
run: |
echo "CC=clang-${{matrix.clang-version}}" >> $GITHUB_ENV
echo "CXX=clang++-${{matrix.clang-version}}" >> $GITHUB_ENV
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.build-type}} ${{env.CMAKE_FLAGS}} .
cd build
cmake --build . --config ${{matrix.build-type}}
- name: Run Test Script
run: |
cd build
ctest .