glerminal/.gitea/workflows/make_png.yaml

41 lines
1.3 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-29 12:03:31 +00:00
lfs: true
- name: Checkout previous known working
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-29 12:03:31 +00:00
lfs: true
- run: cd prev && git checkout 10a90a5f6a
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-29 11:28:50 +00:00
run: cd curr/build/tests && ls $PWD/resources && 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-29 11:28:50 +00:00
run: cd prev/build/tests && ls $PWD/resources && XDG_RUNTIME_DIR=$PWD xvfb-run -a ./test-basic
- name: Upload PNG files
2024-05-28 17:26:55 +00:00
uses: actions/upload-artifact@v3
2024-05-28 17:23:49 +00:00
with:
2024-05-28 17:40:59 +00:00
name: basic
path: |
curr/build/tests/image.png
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