update ci

This commit is contained in:
neargye 2020-11-15 22:54:48 +02:00
parent 8d2044f2d7
commit 0ba625e215
5 changed files with 90 additions and 10 deletions

View file

@ -11,13 +11,8 @@ platform:
build: build:
parallel: true parallel: true
before_build:
- if exist build RMDIR /S /Q build
- if not exist build mkdir build
- cd build
build_script: build_script:
- cmake -A %PLATFORM% .. - cmake -A %PLATFORM%
- cmake --build . --config Debug - cmake --build . --config Debug
- cmake --build . --config Release - cmake --build . --config Release

27
.github/workflows/macos.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: macos
on: [push, pull_request]
jobs:
build:
runs-on: ${{matrix.config.os}}
strategy:
fail-fast: false
matrix:
config:
- { os: macos-10.15, xcode: "12.0.1" } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md#xcode
- { os: macos-11.0, xcode: "11.7" } # https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11.0-Readme.md#xcode
build: [Debug, Release]
name: "xcode${{matrix.config.xcode}}:${{matrix.build}}"
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build}}
- name: Build
run: cmake --build . --config ${{matrix.build}}
- name: Tests
run: ctest --output-on-failure -C ${{matrix.build}}

31
.github/workflows/ubuntu.yml vendored Normal file
View file

@ -0,0 +1,31 @@
name: ubuntu
on: [push, pull_request]
jobs:
ubuntu:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
build: [Debug, Release]
compiler:
- { cc: "gcc-8", cxx: "g++-8" }
- { cc: "gcc-9", cxx: "g++-9" }
- { cc: "gcc-10", cxx: "g++-10" }
- { cc: "clang-8", cxx: "clang++-8" }
- { cc: "clang-9", cxx: "clang++-9" }
- { cc: "clang-10", cxx: "clang++-10" }
name: "${{matrix.compiler.cxx}}:${{matrix.build}}"
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build}} -DCMAKE_C_COMPILER=${{matrix.compiler.cc}} -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}}
- name: Build
run: cmake --build . --config ${{matrix.build}}
- name: Tests
run: ctest --output-on-failure -C ${{matrix.build}}

28
.github/workflows/windows.yml vendored Normal file
View file

@ -0,0 +1,28 @@
name: windows
on: [push, pull_request]
jobs:
build:
runs-on: ${{matrix.config.os}}
strategy:
fail-fast: false
matrix:
config:
- { os: windows-2016, vs: "Visual Studio 2017" } # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2016-Readme.md#visual-studio-enterprise-2017
- { os: windows-2019, vs: "Visual Studio 2019" } # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#visual-studio-enterprise-2019
build: [Debug, Release]
platform: [Win32, x64]
name: "${{matrix.config.vs}}:${{matrix.platform}}:${{matrix.build}}"
steps:
- uses: actions/checkout@v2
- name: Configure CMake
run: cmake -A ${{matrix.platform}}
- name: Build
run: cmake --build . --config ${{matrix.build}}
- name: Tests
run: ctest --output-on-failure -C ${{matrix.build}}

View file

@ -1,10 +1,9 @@
os: linux # Use linux unless specified otherwise. os: linux # Use linux unless specified otherwise.
dist: bionic dist: bionic
sudo: required
language: cpp language: cpp
matrix: jobs:
include: include:
- os: linux - os: linux
compiler: g++ compiler: g++
@ -116,11 +115,11 @@ before_script:
- cd build - cd build
script: script:
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. - cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake --build . --config Debug -- -j${JOBS} - cmake --build . --config Debug -- -j${JOBS}
- ctest --output-on-failure -C Debug -j${JOBS} - ctest --output-on-failure -C Debug -j${JOBS}
- rm -rf ./* - rm -rf ./*
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. - cmake -DCMAKE_BUILD_TYPE=Release ..
- cmake --build . --config Release -- -j${JOBS} - cmake --build . --config Release -- -j${JOBS}
- ctest --output-on-failure -C Release -j${JOBS} - ctest --output-on-failure -C Release -j${JOBS}