2020-07-19 08:12:52 +00:00
|
|
|
name: build
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-linux-gcc:
|
|
|
|
runs-on: Ubuntu-18.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
# g++-4.8 and 4.9 are tested on Travis.CI.
|
|
|
|
compiler: ['g++-9', 'g++-8', 'g++-7', 'g++-6', 'g++-5']
|
2020-09-16 12:28:19 +00:00
|
|
|
standard: ['11', '14', '17', '20']
|
2020-07-19 08:12:52 +00:00
|
|
|
exclude:
|
|
|
|
- {compiler: 'g++-5', standard: '17'}
|
|
|
|
- {compiler: 'g++-6', standard: '17'}
|
2020-09-16 12:28:19 +00:00
|
|
|
- {compiler: 'g++-5', standard: '20'}
|
|
|
|
- {compiler: 'g++-6', standard: '20'}
|
|
|
|
- {compiler: 'g++-7', standard: '20'}
|
2020-07-19 08:12:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
sudo apt-add-repository ppa:mhier/libboost-latest
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install boost1.70
|
|
|
|
if [[ "${{ matrix.compiler }}" == "g++-6" || "${{ matrix.compiler }}" == "g++-5" ]] ; then
|
|
|
|
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install ${{ matrix.compiler }}
|
|
|
|
fi
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2020-09-19 04:42:12 +00:00
|
|
|
if [[ "${{ matrix.compiler }}" == "g++-8" && ( "${{ matrix.standard }}" == "17" || "${{ matrix.standard }}" == "20" ) ]] ; then
|
2020-09-14 17:25:38 +00:00
|
|
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=ON
|
2020-08-06 07:35:49 +00:00
|
|
|
else
|
2020-09-14 17:25:38 +00:00
|
|
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
2020-08-06 07:35:49 +00:00
|
|
|
fi
|
2020-07-19 08:12:52 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cd build && cmake --build .
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
cd build && ctest --output-on-failure
|
|
|
|
build-linux-clang:
|
|
|
|
runs-on: Ubuntu-18.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
compiler: ['10', '9', '8', '7', '6.0', '5.0', '4.0', '3.9']
|
2020-09-16 12:28:19 +00:00
|
|
|
standard: ['11', '14', '17', '20']
|
2020-07-19 08:12:52 +00:00
|
|
|
exclude:
|
|
|
|
- {compiler: '3.9', standard: '17'}
|
|
|
|
- {compiler: '4.0', standard: '17'}
|
|
|
|
- {compiler: '5.0', standard: '17'}
|
2020-09-16 12:28:19 +00:00
|
|
|
- {compiler: '3.9', standard: '20'}
|
|
|
|
- {compiler: '4.0', standard: '20'}
|
|
|
|
- {compiler: '5.0', standard: '20'}
|
2020-07-19 08:12:52 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Install
|
|
|
|
run: |
|
|
|
|
sudo apt-add-repository ppa:mhier/libboost-latest
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install boost1.70
|
|
|
|
if [[ "${{ matrix.compiler }}" != "6" && "${{ matrix.compiler }}" != "8" && "${{ matrix.compiler }}" != "9" ]] ; then
|
|
|
|
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install clang-${{ matrix.compiler }}
|
|
|
|
fi
|
|
|
|
- name: Configure
|
|
|
|
run: |
|
|
|
|
mkdir build && cd build
|
2020-09-14 17:25:38 +00:00
|
|
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=clang++-${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
2020-07-19 08:12:52 +00:00
|
|
|
- name: Build
|
|
|
|
run: |
|
|
|
|
cd build && cmake --build .
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
cd build && ctest --output-on-failure
|
|
|
|
build-windows-msvc:
|
|
|
|
runs-on: windows-2019
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-09-16 12:28:19 +00:00
|
|
|
standard: ['11', '14', '17', '20']
|
2020-07-19 08:12:52 +00:00
|
|
|
config: ['Release', 'Debug']
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
- name: Configure
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
2020-09-16 13:16:40 +00:00
|
|
|
file --mime-encoding tests/test_literals.cpp
|
2020-07-19 08:12:52 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2020-09-14 17:25:38 +00:00
|
|
|
cmake ../ -G "NMake Makefiles" -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DBoost_ADDITIONAL_VERSIONS=1.72.0 -DBoost_USE_MULTITHREADED=ON -DBoost_ARCHITECTURE=-x64 -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT=%BOOST_ROOT_1_72_0%
|
2020-07-19 08:12:52 +00:00
|
|
|
- name: Build
|
|
|
|
working-directory: ./build
|
|
|
|
run: |
|
|
|
|
cmake --build . --config "${{ matrix.config }}"
|
|
|
|
- name: Test
|
|
|
|
working-directory: ./build
|
|
|
|
run: |
|
2020-09-16 13:16:40 +00:00
|
|
|
./tests/test_literals --log_level=all
|
2020-07-19 08:12:52 +00:00
|
|
|
file --mime-encoding tests/toml/tests/example.toml
|
|
|
|
file --mime-encoding tests/toml/tests/fruit.toml
|
|
|
|
file --mime-encoding tests/toml/tests/hard_example.toml
|
|
|
|
file --mime-encoding tests/toml/tests/hard_example_unicode.toml
|
|
|
|
ctest --build-config "${{ matrix.config }}" --output-on-failure
|