fmt/.github/workflows/linux.yml

80 lines
2.3 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:
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]
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
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
os: ubuntu-18.04
2020-11-14 19:52:35 +00:00
- cxx: g++-10
build_type: Debug
2020-11-14 19:52:35 +00:00
std: 17
os: ubuntu-18.04
- cxx: g++-11
build_type: Debug
std: 20
os: ubuntu-20.04
install: sudo apt install g++-11
- 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
2021-04-08 00:18:13 +00:00
- cxx: clang++-11
build_type: Debug
std: 20
os: ubuntu-20.04
- 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
- 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}}
2021-06-10 19:30:34 +00:00
sudo apt install locales-all
2020-11-04 00:48:01 +00:00
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: |
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 \
-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
run: |
threads=`nproc`
cmake --build . --config ${{matrix.build_type}} --parallel $threads
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}}
env:
CTEST_OUTPUT_ON_FAILURE: True