From e8c57b0a2a0a668eefab75d62c07f71526fae573 Mon Sep 17 00:00:00 2001 From: neargye Date: Tue, 24 Nov 2020 16:28:50 +0200 Subject: [PATCH] update ci --- .appveyor.yml | 7 +------ .github/workflows/macos.yml | 27 +++++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/windows.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 3 +++ 5 files changed, 88 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml diff --git a/.appveyor.yml b/.appveyor.yml index 461f775..3b24fbd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -11,13 +11,8 @@ platform: build: parallel: true -before_build: - - if exist build RMDIR /S /Q build - - if not exist build mkdir build - - cd build - build_script: - - cmake -A %PLATFORM% .. + - cmake -A %PLATFORM% - cmake --build . --config Debug - cmake --build . --config Release diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 0000000..dac4666 --- /dev/null +++ b/.github/workflows/macos.yml @@ -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}} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..c47bcf4 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,29 @@ +name: ubuntu + +on: [push, pull_request] + +jobs: + ubuntu: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + build: [Debug, Release] + compiler: + - { cc: "gcc-9", cxx: "g++-9" } + - { cc: "gcc-10", cxx: "g++-10" } + - { 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}} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..266e389 --- /dev/null +++ b/.github/workflows/windows.yml @@ -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}} diff --git a/.travis.yml b/.travis.yml index 04360b5..655eedf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,11 @@ jobs: apt: sources: - ubuntu-toolchain-r-test + - sourceline: 'deb https://storage.googleapis.com/bazel-apt stable jdk1.8' + key_url: 'https://bazel.build/bazel-release.pub.gpg' packages: - g++-10 + - bazel env: - CXX_COMPILER=g++-10 CC_COMPILER=gcc-10