mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 00:38:08 +08:00
ci: activate linux/windows
confirmed that macos works.
This commit is contained in:
242
.github/workflows/main.yml
vendored
242
.github/workflows/main.yml
vendored
@@ -3,88 +3,88 @@ name: build
|
|||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# build-linux-gcc:
|
build-linux-gcc:
|
||||||
# runs-on: Ubuntu-18.04
|
runs-on: Ubuntu-18.04
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# # g++-4.8 and 4.9 are tested on Travis.CI.
|
# g++-4.8 and 4.9 are tested on Travis.CI.
|
||||||
# compiler: ['g++-9', 'g++-8', 'g++-7', 'g++-6', 'g++-5']
|
compiler: ['g++-9', 'g++-8', 'g++-7', 'g++-6', 'g++-5']
|
||||||
# standard: ['11', '14', '17', '20']
|
standard: ['11', '14', '17', '20']
|
||||||
# exclude:
|
exclude:
|
||||||
# - {compiler: 'g++-5', standard: '17'}
|
- {compiler: 'g++-5', standard: '17'}
|
||||||
# - {compiler: 'g++-6', standard: '17'}
|
- {compiler: 'g++-6', standard: '17'}
|
||||||
# - {compiler: 'g++-5', standard: '20'}
|
- {compiler: 'g++-5', standard: '20'}
|
||||||
# - {compiler: 'g++-6', standard: '20'}
|
- {compiler: 'g++-6', standard: '20'}
|
||||||
# - {compiler: 'g++-7', standard: '20'}
|
- {compiler: 'g++-7', standard: '20'}
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: true
|
submodules: true
|
||||||
# - name: Install
|
- name: Install
|
||||||
# run: |
|
run: |
|
||||||
# sudo apt-add-repository ppa:mhier/libboost-latest
|
sudo apt-add-repository ppa:mhier/libboost-latest
|
||||||
# sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install boost1.70
|
sudo apt-get install boost1.70
|
||||||
# if [[ "${{ matrix.compiler }}" == "g++-6" || "${{ matrix.compiler }}" == "g++-5" ]] ; then
|
if [[ "${{ matrix.compiler }}" == "g++-6" || "${{ matrix.compiler }}" == "g++-5" ]] ; then
|
||||||
# sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
||||||
# sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install ${{ matrix.compiler }}
|
sudo apt-get install ${{ matrix.compiler }}
|
||||||
# fi
|
fi
|
||||||
# - name: Configure
|
- name: Configure
|
||||||
# run: |
|
run: |
|
||||||
# mkdir build && cd build
|
mkdir build && cd build
|
||||||
# if [[ "${{ matrix.compiler }}" == "g++-8" && ( "${{ matrix.standard }}" == "17" || "${{ matrix.standard }}" == "20" ) ]] ; then
|
if [[ "${{ matrix.compiler }}" == "g++-8" && ( "${{ matrix.standard }}" == "17" || "${{ matrix.standard }}" == "20" ) ]] ; then
|
||||||
# cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=ON
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DTOML11_REQUIRE_FILESYSTEM_LIBRARY=ON
|
||||||
# else
|
else
|
||||||
# cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_COMPILER=${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
||||||
# fi
|
fi
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: |
|
run: |
|
||||||
# cd build && cmake --build .
|
cd build && cmake --build .
|
||||||
# - name: Test
|
- name: Test
|
||||||
# run: |
|
run: |
|
||||||
# cd build && ctest --output-on-failure
|
cd build && ctest --output-on-failure
|
||||||
# build-linux-clang:
|
build-linux-clang:
|
||||||
# runs-on: Ubuntu-18.04
|
runs-on: Ubuntu-18.04
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# compiler: ['10', '9', '8', '7', '6.0', '5.0', '4.0', '3.9']
|
compiler: ['10', '9', '8', '7', '6.0', '5.0', '4.0', '3.9']
|
||||||
# standard: ['11', '14', '17', '20']
|
standard: ['11', '14', '17', '20']
|
||||||
# exclude:
|
exclude:
|
||||||
# - {compiler: '3.9', standard: '17'}
|
- {compiler: '3.9', standard: '17'}
|
||||||
# - {compiler: '4.0', standard: '17'}
|
- {compiler: '4.0', standard: '17'}
|
||||||
# - {compiler: '5.0', standard: '17'}
|
- {compiler: '5.0', standard: '17'}
|
||||||
# - {compiler: '3.9', standard: '20'}
|
- {compiler: '3.9', standard: '20'}
|
||||||
# - {compiler: '4.0', standard: '20'}
|
- {compiler: '4.0', standard: '20'}
|
||||||
# - {compiler: '5.0', standard: '20'}
|
- {compiler: '5.0', standard: '20'}
|
||||||
# - {compiler: '6.0', standard: '20'}
|
- {compiler: '6.0', standard: '20'}
|
||||||
# - {compiler: '7', standard: '20'}
|
- {compiler: '7', standard: '20'}
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: true
|
submodules: true
|
||||||
# - name: Install
|
- name: Install
|
||||||
# run: |
|
run: |
|
||||||
# sudo apt-add-repository ppa:mhier/libboost-latest
|
sudo apt-add-repository ppa:mhier/libboost-latest
|
||||||
# sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install boost1.70
|
sudo apt-get install boost1.70
|
||||||
# if [[ "${{ matrix.compiler }}" != "6" && "${{ matrix.compiler }}" != "8" && "${{ matrix.compiler }}" != "9" ]] ; then
|
if [[ "${{ matrix.compiler }}" != "6" && "${{ matrix.compiler }}" != "8" && "${{ matrix.compiler }}" != "9" ]] ; then
|
||||||
# sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
sudo apt-add-repository ppa:ubuntu-toolchain-r/test
|
||||||
# sudo apt-get update
|
sudo apt-get update
|
||||||
# sudo apt-get install clang-${{ matrix.compiler }}
|
sudo apt-get install clang-${{ matrix.compiler }}
|
||||||
# fi
|
fi
|
||||||
# - name: Configure
|
- name: Configure
|
||||||
# run: |
|
run: |
|
||||||
# mkdir build && cd build
|
mkdir build && cd build
|
||||||
# cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_C_COMPILER=clang-${{ matrix.compiler }} -DCMAKE_CXX_COMPILER=clang++-${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
cmake .. -Dtoml11_BUILD_TEST=ON -DCMAKE_C_COMPILER=clang-${{ matrix.compiler }} -DCMAKE_CXX_COMPILER=clang++-${{ matrix.compiler }} -DCMAKE_CXX_STANDARD=${{ matrix.standard }}
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: |
|
run: |
|
||||||
# cd build && cmake --build .
|
cd build && cmake --build .
|
||||||
# - name: Test
|
- name: Test
|
||||||
# run: |
|
run: |
|
||||||
# cd build && ctest --output-on-failure
|
cd build && ctest --output-on-failure
|
||||||
|
|
||||||
build-osx:
|
build-osx:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
@@ -110,42 +110,42 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd build && ctest --output-on-failure
|
cd build && ctest --output-on-failure
|
||||||
|
|
||||||
# build-windows-msvc:
|
build-windows-msvc:
|
||||||
# runs-on: windows-2019
|
runs-on: windows-2019
|
||||||
# strategy:
|
strategy:
|
||||||
# matrix:
|
matrix:
|
||||||
# standard: ['11', '14', '17', '20']
|
standard: ['11', '14', '17', '20']
|
||||||
# config: ['Release', 'Debug']
|
config: ['Release', 'Debug']
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
# with:
|
with:
|
||||||
# submodules: true
|
submodules: true
|
||||||
# - name: Install
|
- name: Install
|
||||||
# run: |
|
run: |
|
||||||
# (New-Object System.Net.WebClient).DownloadFile("https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz", "$env:TEMP\\boost.tar.gz")
|
(New-Object System.Net.WebClient).DownloadFile("https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz", "$env:TEMP\\boost.tar.gz")
|
||||||
# 7z.exe x "$env:TEMP\\boost.tar.gz" -o"$env:TEMP\\boostArchive" -y | Out-Null
|
7z.exe x "$env:TEMP\\boost.tar.gz" -o"$env:TEMP\\boostArchive" -y | Out-Null
|
||||||
# 7z.exe x "$env:TEMP\\boostArchive" -o"$env:TEMP\\boost" -y | Out-Null
|
7z.exe x "$env:TEMP\\boostArchive" -o"$env:TEMP\\boost" -y | Out-Null
|
||||||
# Push-Location -Path "$env:TEMP\\boost"
|
Push-Location -Path "$env:TEMP\\boost"
|
||||||
# Invoke-Expression .\\setup.ps1
|
Invoke-Expression .\\setup.ps1
|
||||||
# - uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
# - name: Configure
|
- name: Configure
|
||||||
# shell: cmd
|
shell: cmd
|
||||||
# run: |
|
run: |
|
||||||
# file --mime-encoding tests/test_literals.cpp
|
file --mime-encoding tests/test_literals.cpp
|
||||||
# mkdir build
|
mkdir build
|
||||||
# cd build
|
cd build
|
||||||
# cmake ../ -G "NMake Makefiles" -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT="C:\\hostedtoolcache\\windows\\Boost\\1.72.0\\x86_64"
|
cmake ../ -G "NMake Makefiles" -Dtoml11_BUILD_TEST=ON -DCMAKE_CXX_STANDARD=${{ matrix.standard }} -DBoost_NO_BOOST_CMAKE=ON -DBOOST_ROOT="C:\\hostedtoolcache\\windows\\Boost\\1.72.0\\x86_64"
|
||||||
# - name: Build
|
- name: Build
|
||||||
# working-directory: ./build
|
working-directory: ./build
|
||||||
# run: |
|
run: |
|
||||||
# cmake --build . --config "${{ matrix.config }}"
|
cmake --build . --config "${{ matrix.config }}"
|
||||||
# - name: Test
|
- name: Test
|
||||||
# working-directory: ./build
|
working-directory: ./build
|
||||||
# run: |
|
run: |
|
||||||
# ./tests/test_literals --log_level=all
|
./tests/test_literals --log_level=all
|
||||||
# file --mime-encoding tests/toml/tests/example.toml
|
file --mime-encoding tests/toml/tests/example.toml
|
||||||
# file --mime-encoding tests/toml/tests/fruit.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.toml
|
||||||
# file --mime-encoding tests/toml/tests/hard_example_unicode.toml
|
file --mime-encoding tests/toml/tests/hard_example_unicode.toml
|
||||||
# ctest --build-config "${{ matrix.config }}" --output-on-failure
|
ctest --build-config "${{ matrix.config }}" --output-on-failure
|
||||||
|
Reference in New Issue
Block a user