fmt/.github/workflows/linux.yml

38 lines
930 B
YAML
Raw Normal View History

2020-11-03 18:45:16 +00:00
name: linux
2020-11-03 18:04:28 +00:00
on: [push]
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-03 18:04:28 +00:00
steps:
- uses: actions/checkout@v2
2020-11-03 22:02:07 +00:00
- name: Install GCC
if: matrix.cxx == 'g++-4.8'
run: sudo apt install g++-4.8
2020-11-03 18:04:28 +00:00
- name: Create Build Environment
2020-11-03 19:48:20 +00:00
run: 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: |
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-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}}