2020-11-03 18:45:16 +00:00
|
|
|
name: linux
|
|
|
|
|
2020-11-04 00:01:26 +00:00
|
|
|
on: [push, pull_request]
|
2020-11-03 18:04:28 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-01-23 15:52:41 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2020-11-03 19:41:25 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-04-01 15:24:55 +00:00
|
|
|
cxx: [g++-4.8, g++-10, clang++-9]
|
2020-11-03 20:16:15 +00:00
|
|
|
build_type: [Debug, Release]
|
2020-11-14 19:52:35 +00:00
|
|
|
std: [11]
|
2021-01-23 15:52:41 +00:00
|
|
|
os: [ubuntu-18.04]
|
2020-11-04 00:48:01 +00:00
|
|
|
include:
|
2020-11-14 19:52:35 +00:00
|
|
|
- cxx: g++-4.8
|
|
|
|
install: sudo apt install g++-4.8
|
2021-01-23 15:52:41 +00:00
|
|
|
os: ubuntu-18.04
|
2020-11-14 19:52:35 +00:00
|
|
|
- cxx: g++-8
|
2021-04-07 23:49:30 +00:00
|
|
|
build_type: Debug
|
2020-11-14 19:52:35 +00:00
|
|
|
std: 14
|
2021-04-01 15:24:55 +00:00
|
|
|
install: sudo apt install g++-8
|
2021-01-23 15:52:41 +00:00
|
|
|
os: ubuntu-18.04
|
2020-11-14 19:52:35 +00:00
|
|
|
- cxx: g++-10
|
2021-04-07 23:49:30 +00:00
|
|
|
build_type: Debug
|
2020-11-14 19:52:35 +00:00
|
|
|
std: 17
|
2021-01-23 15:52:41 +00:00
|
|
|
os: ubuntu-18.04
|
2020-11-15 17:03:20 +00:00
|
|
|
- cxx: g++-10
|
2021-04-07 23:49:30 +00:00
|
|
|
build_type: Debug
|
2020-11-15 17:03:20 +00:00
|
|
|
std: 20
|
|
|
|
cxxflags: -DFMT_COMPILE_TIME_CHECKS=1
|
2021-01-23 15:52:41 +00:00
|
|
|
os: ubuntu-20.04
|
2020-11-08 13:18:24 +00:00
|
|
|
- cxx: clang++-9
|
2020-11-04 00:48:01 +00:00
|
|
|
build_type: Debug
|
|
|
|
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
|
2020-11-14 19:52:35 +00:00
|
|
|
std: 17
|
2021-01-23 15:52:41 +00:00
|
|
|
os: ubuntu-18.04
|
2021-04-08 00:18:13 +00:00
|
|
|
- cxx: clang++-11
|
|
|
|
build_type: Debug
|
|
|
|
std: 20
|
|
|
|
os: ubuntu-20.04
|
2021-04-08 00:25:40 +00:00
|
|
|
- cxx: clang++-11
|
|
|
|
build_type: Debug
|
|
|
|
std: 20
|
|
|
|
cxxflags: -stdlib=libc++
|
|
|
|
os: ubuntu-20.04
|
|
|
|
install: sudo apt install libc++-11-dev libc++abi-11-dev
|
2021-05-18 12:38:55 +00:00
|
|
|
- shared: -DBUILD_SHARED_LIBS=ON
|
2020-11-03 18:04:28 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Create Build Environment
|
2020-11-04 00:48:01 +00:00
|
|
|
run: |
|
|
|
|
${{matrix.install}}
|
|
|
|
cmake -E make_directory ${{runner.workspace}}/build
|
2020-11-03 18:04:28 +00:00
|
|
|
|
2020-11-03 22:02:07 +00:00
|
|
|
- name: Configure
|
2020-11-03 18:04:28 +00:00
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 19:49:35 +00:00
|
|
|
env:
|
|
|
|
CXX: ${{matrix.cxx}}
|
2020-11-15 17:03:20 +00:00
|
|
|
CXXFLAGS: ${{matrix.cxxflags}}
|
2020-11-03 22:02:07 +00:00
|
|
|
run: |
|
2021-05-18 12:38:55 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} ${{matrix.shared}} \
|
2020-11-14 19:52:35 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.std}} -DFMT_DOC=OFF \
|
2021-05-18 12:38:55 +00:00
|
|
|
-DCMAKE_CXX_VISIBILITY_PRESET=hidden -DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
|
2020-11-14 19:52:35 +00:00
|
|
|
-DFMT_PEDANTIC=ON -DFMT_WERROR=ON $GITHUB_WORKSPACE
|
2020-11-03 18:04:28 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: cmake --build . --config ${{matrix.build_type}}
|
2020-11-03 18:04:28 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: ctest -C ${{matrix.build_type}}
|
2021-05-06 16:20:46 +00:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: True
|