Update cmake-linux-gcc.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: Build with Linux GCC | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- modules | |
jobs: | |
build-linux-gcc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Maybe useful update | |
run: sudo apt update | |
- name: Cache APT Packages - GCC, Ninja, GLFW-needed ones | |
uses: awalsh128/[email protected] | |
with: | |
packages: wayland-protocols libwayland-dev libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev pkg-config build-essential gcc g++ ninja-build libwayland-client0.1-0 libwayland-cursor0 libwayland-egl1.0-0 xkbcommon | |
execute_install_scripts: true # optional, set to true if you need to run install scripts | |
- name: Cache CMake and Build Files | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cmake/packages | |
build | |
key: gcc-${{ github.ref }}-${{ github.sha }} | |
restore-keys: | | |
gcc-${{ github.ref }} | |
- name: Configure CMake | |
run: | | |
mkdir -p build | |
cd build | |
cmake -G "Ninja" .. \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=gcc \ | |
-DCMAKE_CXX_COMPILER=g++ | |
- name: Build | |
run: | | |
cd build | |
cmake --build . --verbose | |
- name: Run Tests | |
working-directory: build | |
run: ctest --output-on-failure |