2021-12-11 08:30:06 +01:00
|
|
|
name: Graphics CI
|
|
|
|
|
|
|
|
on:
|
2022-05-15 08:06:01 +02:00
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- "**.md"
|
2021-12-11 08:30:06 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
gg-regressions:
|
|
|
|
runs-on: ubuntu-18.04
|
2022-05-22 19:19:04 +02:00
|
|
|
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
|
2021-12-11 08:30:06 +01:00
|
|
|
timeout-minutes: 10
|
|
|
|
env:
|
|
|
|
VFLAGS: -cc tcc
|
|
|
|
DISPLAY: :99
|
|
|
|
steps:
|
|
|
|
- name: Checkout V
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Build local v
|
|
|
|
run: make -j4
|
|
|
|
|
|
|
|
- name: Setup dependencies
|
|
|
|
run: |
|
|
|
|
# xvfb : xvfb (installed by openrndr/setup-opengl@v1.1)
|
|
|
|
# openimageio-tools : idiff
|
|
|
|
# libxcursor-dev libxi-dev : V gfx deps
|
|
|
|
# mesa-common-dev : For headless rendering
|
|
|
|
# freeglut3-dev : Fixes graphic apps compilation with tcc
|
|
|
|
sudo apt-get install imagemagick openimageio-tools mesa-common-dev libxcursor-dev libxi-dev freeglut3-dev
|
|
|
|
wget https://raw.githubusercontent.com/tremby/imgur.sh/c98345d/imgur.sh
|
|
|
|
chmod +x ./imgur.sh
|
|
|
|
|
|
|
|
- uses: openrndr/setup-opengl@v1.1
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: Larpon/gg-regression-images
|
|
|
|
path: gg-regression-images
|
|
|
|
|
|
|
|
- name: Sample and compare
|
|
|
|
id: compare
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
Xvfb $DISPLAY -screen 0 1280x1024x24 &
|
2021-12-13 19:58:31 +01:00
|
|
|
./v gret -t ./gg-regression-images/vgret.v_examples.toml -v ./gg-sample_images ./gg-regression-images
|
2021-12-11 08:30:06 +01:00
|
|
|
|
|
|
|
- name: Upload regression to imgur
|
|
|
|
if: steps.compare.outcome != 'success'
|
|
|
|
run: |
|
|
|
|
./imgur.sh /tmp/fail.png
|
|
|
|
exit 1
|