Skip to content

Add CI workflow

Add CI workflow #2

Workflow file for this run

on:
pull_request:
push:
branches: [ master ]
defaults:
run:
shell: bash
env:
CMAKE_GENERATOR: Ninja
CMAKE_C_COMPILER_LAUNCHER: ccache
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CCACHE_DIR: "${{ github.workspace }}/ccache"
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
build_type: ["Release", "Debug"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- run: sudo apt update && sudo apt install ccache ninja-build
- name: Install JUCE dependencies
run: >
sudo apt install
libasound2-dev libjack-jackd2-dev
ladspa-sdk
libcurl4-openssl-dev
libfreetype-dev libfontconfig1-dev
libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev
libwebkit2gtk-4.1-dev
libglu1-mesa-dev mesa-common-dev
- name: ccache
uses: actions/cache@v4
with:
path: ${{ env.CCACHE_DIR }}
key: ccache-v1-${{ github.job }}-${{matrix.build_type}}-${{ github.sha }}
restore-keys: |
ccache-v1-${{ github.job }}-${{matrix.build_type}}
- name: ccache reset statistics
run: ccache --zero-stats
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} host
- name: Build
run: cmake --build build --target Valvestate_Standalone
- name: ccache statistics
run: ccache --show-stats