Skip to content

Split workflows and add regressions #1

Split workflows and add regressions

Split workflows and add regressions #1

Workflow file for this run

name: Hop wine tests
on:
pull_request:
workflow_dispatch:
jobs:
wineBuild:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: pack headers
run: |
mkdir headers
for inc in include/jGL/include/jGL \
include/jGL/include/*.h \
include/jGL/include/vendored/freetype/include/* \
include/jGL/include/vendored/glew/include/GL \
include/jGL/include/vendored/glfw/include/GLFW \
include/jGL/include/vendored/glm/glm \
include/jGL/include/vendored/stduuid/include/uuid.h \
include/jGL/include/vendored/stduuid/gsl \
include/jGL/include/vendored/stb_image.h \
include/jLog \
include/jThread \
include/Collision \
include/Component \
include/Console \
include/Debug \
include/Maths \
include/Object \
include/Shader \
include/System \
include/Util \
include/World \
include/vendored/lua/src/lauxlib.h \
include/vendored/lua/src/lua.h \
include/vendored/lua/src/luaconf.h \
include/vendored/lua/src/lualib.h \
include/vendored/miniaudio \
include/vendored/json.hpp \
include/*.h \
include/vendored/vorbis/include/vorbis \
include/vendored/ogg/include/ogg \
include/vendored/sparsehash;
do cp -r $inc headers; done
- name: pack headers mingw
run: |
mkdir headers-mingw
cp -r headers/* headers-mingw
mkdir headers-mingw/VulkanSDK
cp -r include/jGL/include/vendored/VulkanSDK/Include headers-mingw/VulkanSDK/
cp -r include/jGL/include/vendored/VulkanSDK/Windows headers-mingw/VulkanSDK/
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64
- name: linux-X-windows
run: ./build.sh -w -d -r -t
- name: Tests (wine64)
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
cp *.dll TestAssetStore/
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ctest --output-on-failure --verbose --exclude-regex Vulkan
wineBuildAndRun:
if: ${{ github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-22.04
strategy:
matrix:
example: [PerlinWorld, SoftBodyTetris, Sprites, MeshEditor]
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64
- name: linux-windows
run: |
./build.sh -r -w -d
- name: run ${{ matrix.example }}
run: |
cd build/${{ matrix.example }}
chmod +x ${{ matrix.example }}.exe
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
sleep 5 && kill $PID
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.example }}-wine.png
path: build/${{ matrix.example }}/screenshot.png
- name: regression
run: |
mkdir tests/regression/user-mingw/include/
cp build/*.a tests/regression/user-mingw/
cp -r headers-mingw/* tests/regression/user-mingw/include/
cd tests/regression/user-mingw
./build.sh