name: CMake on: push: branches: [ master ] pull_request: branches: [ master ] env: BUILD_TYPE: Release jobs: build: # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. # You can convert this to a matrix build if you need cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix runs-on: ${{ matrix.os }} strategy: matrix: os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-latest, macos-latest ] steps: - uses: actions/checkout@v2 with: submodules: true - name: Install needed dependencies run: sudo apt install xorg-dev libglu1-mesa-dev if: ${{ matrix.os }} != "macos-latest" - name: Configure CMake run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}