Update cmake-auto-release.yml #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Worker | |
on: | |
push: | |
branches: [ "version-core" ] | |
pull_request: | |
branches: [ "version-core" ] | |
jobs: | |
release: | |
name: Release | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
build_type: [Release] | |
c_compiler: [g++] | |
include: | |
- os: windows-latest | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
cpp_compiler: g++ | |
steps: | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@v4 | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Check if Git is installed | |
run: git --version | |
- name: Check if directory is a Git repository | |
run: git rev-parse --is-inside-work-tree | |
id: check_git_repo | |
continue-on-error: true | |
- name: Check Commit Message | |
id: check_commit_message | |
run: echo ::set-output name=message::$(git log --format=%B -n 1 ${{ github.sha }}) | |
- name: Release Condition | |
if: startsWith(steps.check_commit_message.outputs.message, '[release]') | |
id: release_condition | |
run: exit 0 | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ github.workspace }}/cmake-build-debug | |
-S ${{ github.workspace }} | |
-G Ninja | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} | |
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
-DEKG_ENABLE_TEST=0 | |
-DEKG_LINUX_NOT_FOUND_FREETYPE=1 | |
- name: Build Cmake | |
run: > | |
cmake --build ${{ github.workspace }}/cmake-build-debug |