fmt/.github/workflows/linux.yml

62 lines
1.6 KiB
YAML
Raw Normal View History

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:
runs-on: ${{ matrix.os }}
2020-11-03 19:41:25 +00:00
strategy:
matrix:
cxx: [g++-4.8, g++-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]
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
os: ubuntu-18.04
2020-11-14 19:52:35 +00:00
- cxx: g++-8
std: 14
os: ubuntu-18.04
2020-11-14 19:52:35 +00:00
- cxx: g++-10
std: 17
os: ubuntu-18.04
- cxx: g++-10
std: 20
cxxflags: -DFMT_COMPILE_TIME_CHECKS=1
os: ubuntu-20.04
2020-11-14 19:52:35 +00:00
- cxx: clang++-9
std: 11
os: ubuntu-18.04
- 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
os: ubuntu-18.04
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}}
CXXFLAGS: ${{matrix.cxxflags}}
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-14 19:52:35 +00:00
-DCMAKE_CXX_STANDARD=${{matrix.std}} -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}}