From a2cd920563a30fc9163cf393b5b2d48f5e3e1e66 Mon Sep 17 00:00:00 2001 From: LibretroAdmin Date: Wed, 28 Oct 2026 10:48:27 +0100 Subject: [PATCH] CI: Linux griffin unity build make -f Makefile.griffin platform=unix, on every push and pull request. --- .github/workflows/Linux-griffin.yml | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/Linux-griffin.yml diff --git a/.github/workflows/Linux-griffin.yml b/.github/workflows/Linux-griffin.yml new file mode 100644 index 0000000000..f406b14a82 --- /dev/null +++ b/.github/workflows/Linux-griffin.yml @@ -0,0 +1,88 @@ +name: CI Linux Griffin [Unity build] + +on: + push: + branches: + - master + pull_request: + branches: + - master + +permissions: + contents: read + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + +jobs: + linux-griffin: # griffin/griffin.c as Makefile.griffin builds it for Linux + runs-on: ubuntu-latest + env: + APT_PKGS: build-essential libgl-dev libudev-dev libpulse-dev libx11-dev libx11-xcb-dev libxcb1-dev libxxf86vm-dev ccache + timeout-minutes: 30 + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Apt cache key + id: apt + run: sh .github/workflows/scripts/apt-cache-key.sh "$APT_PKGS" + + - name: Restore apt cache + uses: actions/cache/restore@v4 + with: + path: ~/.apt-cache + key: ${{ steps.apt.outputs.key }} + restore-keys: ${{ steps.apt.outputs.prefix }} + + - name: Install dependencies + timeout-minutes: 20 + run: sh .github/workflows/scripts/apt-install.sh $APT_PKGS + + - name: Save apt cache + if: env.APT_CACHE_SAVE == '1' + uses: actions/cache/save@v4 + with: + path: ~/.apt-cache + key: ${{ steps.apt.outputs.key }} + + - name: Link with lld + run: sh .github/workflows/scripts/use-lld.sh + + - name: Restore ccache + uses: actions/cache/restore@v4 + with: + path: ~/.ccache + key: ccache-${{ github.workflow }}-${{ github.job }}-${{ github.sha }} + restore-keys: | + ccache-${{ github.workflow }}-${{ github.job }}- + + - name: Enable ccache + run: | + set -eu + export CCACHE_DIR="$HOME/.ccache" + echo "CCACHE_DIR=$CCACHE_DIR" >> "$GITHUB_ENV" + echo "/usr/lib/ccache" >> "$GITHUB_PATH" + ccache -M 250M + ccache -z + + - name: Build + run: make -f Makefile.griffin platform=unix -j"$(nproc)" + + - name: ccache statistics + if: ${{ !cancelled() }} + continue-on-error: true + run: ccache -sv + + - name: Save ccache + # Only master's pushes keep a cache: pull requests restore + # master's, so one push does not evict the next one's. + if: success() && github.event_name == 'push' && github.ref == 'refs/heads/master' + uses: actions/cache/save@v4 + with: + path: ~/.ccache + key: ccache-${{ github.workflow }}-${{ github.job }}-${{ github.sha }}