mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +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
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -7,10 +6,41 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Indicates the CMake build directory where project files and binaries are being produced.
|
||||||
|
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
||||||
|
|
||||||
jobs:
|
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:
|
native:
|
||||||
name: ${{ matrix.os }} ${{ matrix.cc }}
|
name: ${{ matrix.os }} ${{ matrix.cc }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: minimum-cmake-version
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -23,14 +53,9 @@ jobs:
|
|||||||
cc: clang
|
cc: clang
|
||||||
cxx: clang++
|
cxx: clang++
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# Indicates the CMake build directory where project files and binaries are being produced.
|
|
||||||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
|
||||||
|
|
||||||
CC: ${{ matrix.cc }}
|
CC: ${{ matrix.cc }}
|
||||||
CXX: ${{ matrix.cxx }}
|
CXX: ${{ matrix.cxx }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@@ -65,13 +90,9 @@ jobs:
|
|||||||
cross-android:
|
cross-android:
|
||||||
name: cross-android
|
name: cross-android
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: minimum-cmake-version
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
||||||
env:
|
|
||||||
# Indicates the CMake build directory where project files and binaries are being produced.
|
|
||||||
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
# 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/>.
|
# 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)
|
project(bgfx)
|
||||||
cmake_policy(SET CMP0054 NEW)
|
cmake_policy(SET CMP0054 NEW)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user