mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-25 03:25:16 -10:00
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.
156 lines
6.2 KiB
YAML
156 lines
6.2 KiB
YAML
name: CI macOS
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
# ci_paths: generated by tools/ci_paths.py, do not edit
|
|
paths:
|
|
- '**'
|
|
- '!.github/workflows/*.yml'
|
|
- '.github/workflows/MacOS.yml'
|
|
# ci_paths: end
|
|
pull_request:
|
|
# ci_paths: generated by tools/ci_paths.py, do not edit
|
|
paths:
|
|
- '**'
|
|
- '!.github/workflows/*.yml'
|
|
- '.github/workflows/MacOS.yml'
|
|
# ci_paths: end
|
|
|
|
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:
|
|
build:
|
|
runs-on: macos-latest
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Cocoa companion harness on Apple's AppKit
|
|
run: |
|
|
set -o pipefail
|
|
# The same harness the Linux job runs under GNUstep, built with
|
|
# Apple's clang against the real Cocoa framework and run on the
|
|
# runner's window server: key-window arbitration after closing the
|
|
# companion, the grid, the tables, the dialogs - as AppKit does them.
|
|
tools/companion_cocoa_test_macos.sh 2>&1 | grep -v "^$"
|
|
|
|
- name: Metal texture behaviour the surface, overlay and lent-framebuffer paths assume
|
|
run: |
|
|
set -o pipefail
|
|
# The driver's Metal paths have only ever been compiled. This
|
|
# asserts the two behaviours they are built on, on the runner's
|
|
# real device: a texture replaced in place while GPU work that
|
|
# samples it is in flight - the animated preview's steady
|
|
# state, and the one path with no fence check or DO_NOT_WAIT to
|
|
# drop a frame with - and an overlay page holding textures the
|
|
# pack owns, where a page switch must not take them with it.
|
|
#
|
|
# 77 means the runner exposed no Metal device; the sample says
|
|
# so rather than passing quietly.
|
|
cd samples/gfx/metal_texture_update
|
|
make check; rc=$?
|
|
if [ "$rc" = 77 ]; then
|
|
echo "::warning::no Metal device on this runner; the check did not run"
|
|
exit 0
|
|
fi
|
|
exit "$rc"
|
|
|
|
- name: Retained Metal frame lease on the native GPU
|
|
run: |
|
|
rc=0
|
|
python3 samples/gfx/metal_frame/run.py --native || rc=$?
|
|
if [ "$rc" = 77 ]; then
|
|
echo "::warning::Metal shared events unavailable; lease GPU check did not run"
|
|
exit 0
|
|
fi
|
|
exit "$rc"
|
|
|
|
- name: iCloud Drive cloud sync driver
|
|
run: |
|
|
set -o pipefail
|
|
# Includes network/cloud_sync/icloud_drive.m, with the iCloud
|
|
# container redirected to a temporary directory. Cloud sync
|
|
# waits for every request to report exactly once: a read whose
|
|
# local file could not be created never reported (the sync
|
|
# hung), and a cloud file that could not be loaded or a local
|
|
# file that could not be read reported twice. With iCloud
|
|
# unavailable, read and delete reported success. Also covers
|
|
# the ordinary read, missing file, upload and delete paths.
|
|
cd samples/network/icloud_drive
|
|
make clean check SANITIZER=address,undefined
|
|
|
|
- name: iCloud (CloudKit) cloud sync driver
|
|
run: |
|
|
set -o pipefail
|
|
# Includes network/cloud_sync/icloud.m, with CloudKit replaced by
|
|
# an in-memory database (+[CKContainer defaultContainer] is
|
|
# overridden in a category; real CKRecord/CKAsset/CKQuery). A
|
|
# read whose local file could not be written, or whose record
|
|
# held no readable data, reported success; an upload whose
|
|
# lookup failed created a duplicate record; a delete reported
|
|
# success before its deletes were sent, whatever became of
|
|
# them; and non-destructive sync was ignored. Checks each case,
|
|
# that deletes and uploads keep <path>-<time> with destructive
|
|
# sync off (and not for destructive sync or the manifest), and
|
|
# that every request reports exactly once.
|
|
cd samples/network/icloud_cloudkit
|
|
make clean check SANITIZER=address,undefined
|
|
|
|
- name: Compile RA
|
|
run: |
|
|
set -o pipefail
|
|
xcodebuild -workspace pkg/apple/RetroArch.xcworkspace -scheme RetroArch -config Release -xcconfig pkg/apple/GitHubCI.xcconfig -derivedDataPath build
|
|
|
|
- name: Get short SHA
|
|
id: slug
|
|
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/upload-artifact@v6
|
|
with:
|
|
name: RetroArch-${{ steps.slug.outputs.sha8 }}
|
|
path: |
|
|
build/Build/Products/Release
|
|
|
|
# The threaded-video harness on the Metal driver: the real frontend
|
|
# under Cocoa's own main (see samples/gfx/threaded_video/harness_cocoa.m),
|
|
# every lane the Vulkan and D3D legs run, on the runner's GPU. A
|
|
# Makefile build, since the harness links the tree's objects.
|
|
metal-harness:
|
|
runs-on: macos-latest
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Match the runner's library deployment target
|
|
run: echo "MACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion)" >> "$GITHUB_ENV"
|
|
|
|
- name: Configure and build (Makefile, no Qt)
|
|
run: |
|
|
set -o pipefail
|
|
./configure --disable-qt --disable-ffmpeg --disable-discord --disable-cheevos \
|
|
--disable-networking --disable-sdl2 --disable-sdl --disable-translate \
|
|
--disable-update_cores --disable-update_assets --disable-online_updater \
|
|
--disable-cdrom --disable-7zip --disable-ssl 2>&1 | tail -5
|
|
make -j$(sysctl -n hw.ncpu) MINVERFLAGS="-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" GFX_INSTRUMENT=1 2>&1 | grep -E "error|warning: unused" || true
|
|
test -x retroarch
|
|
|
|
- name: Harness on Metal (RGB565 core, then XRGB8888)
|
|
env:
|
|
# Hosted macOS timers cannot reliably meet the synthetic 120 Hz grid.
|
|
HARNESS_SKIP_PHASE_GRID: '1'
|
|
run: |
|
|
set -o pipefail
|
|
SAN=none GFX_INSTRUMENT=1 DRIVER=metal CYCLES=1 make -C samples/gfx/threaded_video MINVERFLAGS="-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" check-driver
|
|
HARNESS_CORE_XRGB8888=1 SAN=none GFX_INSTRUMENT=1 DRIVER=metal CYCLES=1 make -C samples/gfx/threaded_video MINVERFLAGS="-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" check-driver
|