glerminal/.gitea/workflows/make_png.yaml

42 lines
1.4 KiB
YAML
Raw Normal View History

2024-05-28 15:13:15 +00:00
name: Make PNG
run-name: ${{ gitea.actor }} is recording the PNG output.
on: push
jobs:
build-app:
runs-on: linux_amd64
steps:
2024-05-28 15:17:43 +00:00
- name: Checkout current
2024-05-28 15:13:15 +00:00
uses: actions/checkout@v4
with:
path: curr
2024-05-28 15:16:24 +00:00
submodules: recursive
2024-05-28 15:17:43 +00:00
- name: Checkout previous
2024-05-28 15:13:15 +00:00
uses: actions/checkout@v4
with:
path: prev
fetch-depth: 2
2024-05-28 15:16:24 +00:00
submodules: recursive
2024-05-28 15:13:15 +00:00
- run: cd prev && git checkout HEAD^
2024-05-28 15:17:43 +00:00
- name: Build current
2024-05-28 15:21:12 +00:00
run: cmake -S curr -B curr/build -DGLERMINAL_TEST=ON && cmake --build curr/build
2024-05-28 15:17:43 +00:00
- name: Build previous
2024-05-28 15:21:12 +00:00
run: cmake -S prev -B prev/build -DGLERMINAL_TEST=ON && cmake --build prev/build
2024-05-28 17:23:49 +00:00
- name: Generate PNG file for current
2024-05-28 17:11:39 +00:00
run: cd curr/build/tests && XDG_RUNTIME_DIR=$PWD xvfb-run -a ./test-basic
2024-05-28 17:23:49 +00:00
- name: Generate PNG file for previous
2024-05-28 17:11:39 +00:00
run: cd prev/build/tests && XDG_RUNTIME_DIR=$PWD xvfb-run -a ./test-basic
2024-05-28 17:23:49 +00:00
- name: Upload current PNG
2024-05-28 17:26:55 +00:00
uses: actions/upload-artifact@v3
2024-05-28 17:23:49 +00:00
with:
name: current-basic
path: curr/build/tests/image.png
- name: Upload previous PNG
2024-05-28 17:26:55 +00:00
uses: actions/upload-artifact@v3
2024-05-28 17:23:49 +00:00
with:
name: previous-basic
path: prev/build/tests/image.png
2024-05-28 15:13:15 +00:00
- name: Compare PNG files
run: diff curr/build/tests/image.png prev/build/tests/image.png