Update cmake-worker.yml #8
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] | |
cpp_compiler: [g++] | |
include: | |
- os: windows-latest | |
cpp_compiler: g++ | |
- os: ubuntu-latest | |
cpp_compiler: g++ | |
steps: | |
- 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: Install Ninja | |
uses: ashutoshvarma/setup-ninja@master | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ github.workspace }}/cmake-build-debug | |
-S ${{ github.workspace }} | |
-G Ninja | |
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} | |
-DEKG_ENABLE_TEST=0 | |
-DEKG_LINUX_NOT_FOUND_FREETYPE=1 | |
- uses: libsdl-org/setup-sdl@main | |
if: startsWith(matrix.os, 'windows-') | |
id: sdl | |
with: | |
install-linux-dependencies: true | |
version: 2-latest | |
- name: Windows Install Libraries | |
if: startsWith(matrix.os, 'windows-') | |
run: | | |
git clone https://gitlab.freedesktop.org/freetype/freetype.git | |
cd freetype | |
ninja --version | |
cmake -S . -B ./cmake-build-debug -G Ninja -DCMAKE_C_COMPILER=gcc -DCMAKE_MAKE_PROGRAM=${{ github.workspace }}/ninja | |
cmake --build ./cmake-build-debug | |
- name: Linux Install Libraries | |
if: startsWith(matrix.os, 'ubuntu-') | |
run: | | |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc | |
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list | |
sudo apt-get update | |
sudo apt-get install libfreetype6-dev | |
sudo apt-get install libsdl2-dev | |
sudo apt-get install libglew-dev | |
sudo apt-get install vulkan-sdk | |
- name: Build CMake | |
run: | | |
cmake --build ${{ github.workspace }}/cmake-build-debug |