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