Skip to content

Commit

Permalink
Add CI configuration using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedld committed Aug 22, 2021
1 parent aacb859 commit 059c944
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,54 @@
name: CI
on: [push, pull_request]
jobs:
build_cmake:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os: [linux, windows, macos]
build_type: [Debug, RelWithDebInfo]
arch: [x86, x64]
cmake: [minimal, latest]
exclude:
- os: linux
arch: x86
- os: windows
cmake: minimal
- os: macos
arch: x86
- os: macos
cmake: minimal
include:
- cmake: minimal
cmake_url_part: v3.5/cmake-3.5.2
- cmake: latest
cmake_url_part: v3.21/cmake-3.21.1
- os: linux
runner: ubuntu-latest
- os: windows
runner: windows-latest
- os: windows
arch: x86
cmake_args: -A Win32
- os: windows
arch: x64
cmake_args: -A x64
- os: macos
runner: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install dependencies (linux)
if: matrix.os == 'linux'
run: |
wget --no-check-certificate https://cmake.org/files/${{ matrix.cmake_url_part }}-Linux-x86_64.tar.gz -O /tmp/cmake.tar.gz ||
wget --no-check-certificate https://cmake.org/files/${{ matrix.cmake_url_part }}-linux-x86_64.tar.gz -O /tmp/cmake.tar.gz
sudo tar xf /tmp/cmake.tar.gz -C /usr/local --strip-components 1
- name: CMake version
run: cmake --version
- name: Configure
run: cmake -E make_directory _build && cmake -E chdir _build cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.cmake_args }}
- name: Build
run: cmake --build _build --config ${{ matrix.build_type }}
- name: Test
run: cmake -E chdir _build ctest --build-config ${{ matrix.build_type }} --output-on-failure

0 comments on commit 059c944

Please sign in to comment.