mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 13:02:33 +01:00
cmake: test minimum cmake version
This commit is contained in:
43
.github/workflows/ci.yml
vendored
43
.github/workflows/ci.yml
vendored
@@ -1,4 +1,3 @@
|
||||
# https://github.com/openblack/bgfx.cmake/blob/master/.github/workflows/ci.yml
|
||||
name: CI
|
||||
|
||||
on:
|
||||
@@ -7,10 +6,41 @@ on:
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
env:
|
||||
# Indicates the CMake build directory where project files and binaries are being produced.
|
||||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
||||
|
||||
jobs:
|
||||
minimum-cmake-version:
|
||||
name: Check compatibility with minimum cmake version
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CMAKE_VERSION: 3.6.0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt install -y libgl1-mesa-dev
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: ${{ env.CMAKE_VERSION }}
|
||||
- name: Check cmake version
|
||||
run: |
|
||||
cmake --version | grep ${{ env.CMAKE_VERSION }}
|
||||
- name: Test config
|
||||
# old way of configuring a build directory
|
||||
run: |
|
||||
mkdir -p "${{ env.CMAKE_BUILD_DIR }}"
|
||||
cd "${{ env.CMAKE_BUILD_DIR }}"
|
||||
cmake ${{ github.workspace }} -GNinja -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
native:
|
||||
name: ${{ matrix.os }} ${{ matrix.cc }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: minimum-cmake-version
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -23,14 +53,9 @@ jobs:
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
- os: macos-latest
|
||||
|
||||
env:
|
||||
# Indicates the CMake build directory where project files and binaries are being produced.
|
||||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
||||
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
@@ -65,13 +90,9 @@ jobs:
|
||||
cross-android:
|
||||
name: cross-android
|
||||
runs-on: ubuntu-latest
|
||||
needs: minimum-cmake-version
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
env:
|
||||
# Indicates the CMake build directory where project files and binaries are being produced.
|
||||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
cmake_minimum_required(VERSION 3.6.0) # version supported by android studio
|
||||
project(bgfx)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user