Files
RetroArch/.github/workflows/Linux-samples-settings.yml
LibretroAdmin 58106ef61c CI: skip the workflows a push's samples and workflow files do not touch
Every push ran every workflow. tools/ci_paths.py now writes each
workflow's push and pull_request paths filter: everything, less the
samples trees and the other workflow files, plus the sample
directories its jobs build or run (through the scripts they call and
the paths those directories name in turn) and the workflow itself. A
push to one sample runs the full-tree builds no longer, only the
workflows that run that sample; a push to one workflow runs it alone;
any other change runs everything as before. Jobs that call a tool or
CI script, walk the samples trees or read the workflow files keep
those whole, and workflows with a filter of their own keep it.

The CI local runner workflow runs tools/ci_paths.py --check, which
fails when a filter no longer matches what its workflow names, and
tools/ci_local.py which reads past a generated filter to the coverage.
2026-11-04 16:30:17 +01:00

217 lines
7.7 KiB
YAML

name: CI Linux samples/settings
on:
push:
branches:
- master
# ci_paths: generated by tools/ci_paths.py, do not edit
paths:
- '**'
- '!.github/workflows/*.yml'
- '.github/workflows/Linux-samples-settings.yml'
# ci_paths: end
pull_request:
branches:
- master
# ci_paths: generated by tools/ci_paths.py, do not edit
paths:
- '**'
- '!.github/workflows/*.yml'
- '.github/workflows/Linux-samples-settings.yml'
# ci_paths: end
workflow_dispatch:
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:
ps3-user-paths:
name: PS3 per-user directories
runs-on: ubuntu-latest
timeout-minutes: 15
env:
APT_PKGS: gcc-mingw-w64-x86-64 wine64
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: 15
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: Regression test
working-directory: samples/frontend/ps3_user_paths
run: |
. "$GITHUB_WORKSPACE/.github/workflows/scripts/wine-server.sh"
# Each console user's own directory, the shared USRDIR layout
# when it cannot be used, a user's first boot copying the
# shared data, and one copy per imported configuration.
make clean
make -j$(nproc) SANITIZER=address,undefined
ASAN_OPTIONS=detect_leaks=1 UBSAN_OPTIONS=halt_on_error=1 ./ps3_user_paths_test
make clean
make -j$(nproc) CC=x86_64-w64-mingw32-gcc TARGET=ps3_user_paths_test.exe
WINEDEBUG=-all timeout 300 wine ./ps3_user_paths_test.exe
make clean TARGET=ps3_user_paths_test.exe
samples-settings:
name: Build and run samples/settings
runs-on: ubuntu-latest
env:
APT_PKGS: build-essential ccache
timeout-minutes: 15
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: Settings definitions keep their keys and defaults
run: |
set -eu
python3 tools/settings_check_test.py
python3 tools/settings_check.py table --check tools/settings_table.reference
python3 tools/settings_check.py unity
- name: Settings lists have room for what they are given
shell: bash
run: |
set -eu
# configuration.c builds each list of settings into an array
# of a fixed size. One setting too many for its list wrote
# past the end of the array, and RetroArch died of heap
# corruption at startup: two per-port string settings did it
# to the string list. The lists now refuse what they have no
# room for; this counts, in the preprocessed source and for
# each build profile, what every list is given against the
# size it is allocated with, so that the next one is found
# here.
timeout 300 tools/check.sh tools/settings_capacity_check.c
echo "[pass] settings_capacity_check"
- name: Build and run pipeline_migration_test (ASan + UBSan)
shell: bash
working-directory: samples/settings/pipeline_migration
run: |
set -eu
# The audio_threaded_pipeline config migration. The setting
# briefly held off/automatic/on and was saved as a number; it
# is a bool again, and a bool is always saved as "true" or
# "false", so a bare digit on the key is the older three-way
# value. config_get_bool() reads its automatic (1) as an
# explicit on, which forced the pipeline on for users who
# never chose it. Pins each stored digit against both
# defaults, and pins that "true", "false", absent, empty and
# multi-character values are untouched. The rule under test
# is restated from config_load_file(), which needs most of the
# frontend to run; a change to one must be made in the other.
make clean SANITIZER=address,undefined && make -j$(nproc) all SANITIZER=address,undefined
test -x pipeline_migration_test
ASAN_OPTIONS=detect_leaks=1:detect_stack_use_after_return=1 \
UBSAN_OPTIONS=print_stacktrace=1 timeout 60 \
./pipeline_migration_test
echo "[pass] pipeline_migration_test (ASan)"
- name: Build and run cli_override_rows_test (ASan + UBSan)
shell: bash
working-directory: samples/settings/cli_override_rows
run: |
set -eu
# Each command-line override (--log-file, --check-frames,
# --port) must pin its own setting's row: config_save_file()
# skips the row carrying a set override, so on another row it
# dropped that setting and saved the command-line value.
make clean && make check SANITIZER=address,undefined
- name: Build and run float_rows_test (ASan + UBSan)
shell: bash
working-directory: samples/settings/float_rows
run: |
set -eu
# Built without the menu: the float settings that are not the
# menu's (aspect ratio, refresh rate, fast-forward ratio, ...)
# must still be loaded and saved, and no setting of any kind
# may be listed twice.
make clean && make check SANITIZER=address,undefined
- 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 }}