mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-12 04:04:11 +02:00
Significantly reduces the constant duplication of test run steps. Port of #5246, but differs in that the composite action now truncates the log file in-place. CC: This is rebased on top of #5252 because I do NOT want to deal with these merge conflicts again. Signed-off-by: crueter <crueter@eden-emu.dev>
25 lines
617 B
YAML
25 lines
617 B
YAML
name: Run Test and Store Logs
|
|
|
|
inputs:
|
|
target:
|
|
description: 'The test target to run'
|
|
required: true
|
|
log-name:
|
|
description: 'The name suffix of the resulting log file'
|
|
required: true
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Run Tests
|
|
shell: bash
|
|
run: cmake --build build --target ${{ inputs.target }}
|
|
|
|
- name: Move and Truncate Results
|
|
if: ${{ always() }}
|
|
shell: bash
|
|
run: |
|
|
LAST_LOG="build/Testing/Temporary/LastTest"
|
|
truncate --size="<20M" "$LAST_LOG".log || true
|
|
mv "$LAST_LOG".log "${LAST_LOG}_${{ inputs.log-name }}".log || true
|