Fix module name when generating wrapper #290
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Graphics CI | |
on: | |
push: | |
branches: | |
- 'master' | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
jobs: | |
doom-regressions: | |
runs-on: ubuntu-20.04 | |
if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v' | |
timeout-minutes: 10 | |
env: | |
VFLAGS: -cc tcc | |
DISPLAY: :99 | |
LIBGL_ALWAYS_SOFTWARE: true | |
VTMP: /tmp | |
steps: | |
- name: Checkout V | |
uses: actions/checkout@v2 | |
with: | |
repository: vlang/v | |
- name: Build local v | |
run: make && ./v symlink -githubci | |
- name: Checkout c2v | |
uses: actions/checkout@v2 | |
with: | |
path: c2v | |
- name: Setup dependencies | |
run: | | |
sudo apt-get update -y -qq | |
# c2v / DOOM dependencies | |
sudo apt-get install libsdl2-dev libsdl2-mixer-dev libsdl2-net-dev libpng-dev libsamplerate0-dev | |
# vgret dependencies | |
# imagemagick : convert, mogrify, import | |
# xvfb : xvfb | |
# openimageio-tools : idiff | |
# libgl1-mesa-dri : For headless rendering / software DRI driver (LIBGL_ALWAYS_SOFTWARE=true) | |
# freeglut3-dev : Fixes graphic apps compilation with tcc | |
sudo apt-get install imagemagick openimageio-tools freeglut3-dev libgl1-mesa-dri xvfb xsel xclip | |
# Fetch the free ~4MB DOOM1.WAD from the link at https://doomwiki.org/wiki/DOOM1.WAD | |
wget https://distro.ibiblio.org/slitaz/sources/packages/d/doom1.wad -O ~/doom1.wad | |
# Get imgur upload script | |
wget https://raw.githubusercontent.com/tremby/imgur.sh/c98345d/imgur.sh | |
chmod +x ./imgur.sh | |
# Get regression images to test against | |
git clone https://github.com/Larpon/doom-regression-images | |
- name: Build c2v and setup ~/code | |
run: | | |
ls -la /home/runner/work/c2v/c2v/c2v | |
ln -s /home/runner/work/c2v/c2v/c2v ~/.vmodules/c2v | |
mkdir -p ~/code/ | |
v -g ~/.vmodules/c2v/ | |
~/.vmodules/c2v/c2v || true | |
- name: Test c2v | |
run: | | |
v -g test ~/.vmodules/c2v/ | |
v -g run ~/.vmodules/c2v/tests/run_tests.vsh | |
- name: Build original Chocolate Doom | |
run: | | |
git clone --quiet --depth 1 https://github.com/vlang/doom ~/code/doom | |
cd ~/code/doom/chocolate-doom | |
cmake -DCMAKE_BUILD_TYPE=Debug . | |
make chocolate-doom | |
- name: Translate the whole game in project/folder mode | |
run: | | |
cd ~/code/doom | |
WAD_FILE=~/doom1.wad ~/code/doom/build_whole_project.sh | |
- name: Sample and compare | |
id: compare | |
continue-on-error: true | |
run: | | |
Xvfb $DISPLAY -screen 0 800x600x24 & | |
sleep 1 # give xvfb time to start | |
v gret -r ~/code/doom -t ./doom-regression-images/vgret.doom.toml -v ./doom-sample_images ./doom-regression-images | |
- name: Upload regression to imgur | |
if: steps.compare.outcome != 'success' | |
run: | | |
./imgur.sh /tmp/fail.png | |
./imgur.sh /tmp/diff.png | |
exit 1 |