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:
|
2020-11-03 18:45:16 +00:00
|
|
|
runs-on: ubuntu-18.04
|
2020-11-03 19:41:25 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-11-03 22:02:07 +00:00
|
|
|
cxx: [g++-4.8, g++-8, g++-10, clang++]
|
2020-11-03 20:16:15 +00:00
|
|
|
build_type: [Debug, Release]
|
2020-11-04 00:48:01 +00:00
|
|
|
include:
|
|
|
|
- cxx: clang++
|
|
|
|
build_type: Debug
|
|
|
|
fuzz: -DFMT_FUZZ=ON -DFMT_FUZZ_LINKMAIN=ON
|
|
|
|
- cxx: g++-4.8
|
|
|
|
install: sudo apt install g++-4.8
|
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-03 22:02:07 +00:00
|
|
|
run: |
|
2020-11-04 00:48:01 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} ${{matrix.fuzz}} \
|
2020-11-03 22:02:07 +00:00
|
|
|
-DFMT_DOC=OFF -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}}
|