Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use common regression sources #98

Merged
merged 5 commits into from
Nov 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 0 additions & 86 deletions .github/workflows/build-tests.yml

This file was deleted.

121 changes: 66 additions & 55 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: jGL release
name: jGL CI

on:
push:
Expand All @@ -8,6 +8,7 @@ on:
- 'doc/**'
- '.github/**'
workflow_dispatch:
pull_request:

jobs:

Expand Down Expand Up @@ -60,15 +61,15 @@ jobs:
name: headers-mingw
path: headers-mingw

linuxNative:
linux:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Install dependencies
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools

- name: linux-linux
Expand All @@ -80,7 +81,7 @@ jobs:
cp LICENSE linux-x86_64-examples/
cp LICENSE linux-x86_64/

- name: Tests
- name: unit tests
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
Expand All @@ -102,15 +103,15 @@ jobs:
name: linux-x86_64-examples
path: linux-x86_64-examples

linuxXwindows:
windows:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Install dependencies
- 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

- name: linux-X-windows
Expand All @@ -119,6 +120,8 @@ jobs:
mkdir windows
cp -r build/Examples windows-examples
cp build/libjGL.a windows/libjGL-windows.a
cp build/*.dll windows/
cp build/*.dll windows-examples/
cp LICENSE windows-examples/
cp LICENSE windows/

Expand All @@ -134,15 +137,15 @@ jobs:
name: windows-examples
path: windows-examples

macosNative:
macos:
runs-on: macos-13

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'

- name: Install dependencies
- name: install dependencies
run: |
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip
unzip vulkan-sdk.zip
Expand Down Expand Up @@ -173,11 +176,15 @@ jobs:
path: macos-examples

linuxRun:
needs: linuxNative
needs: linux
runs-on: ubuntu-22.04

strategy:
matrix:
example: [Particles, Sprite, Shape]

steps:
- name: Install dependencies
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick

- name: get linux build
Expand All @@ -188,12 +195,49 @@ jobs:
- name: launch and screenshot
run: |
ls
cd Particles
chmod +x Particles
cd ${{ matrix.example }}
chmod +x ${{ matrix.example }}
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ./${{ matrix.example }} &
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 }}.png
path: ${{ matrix.example }}/screenshot.png

wineRun:
needs: windows
runs-on: ubuntu-22.04

strategy:
matrix:
example: [Particles, Sprite, Shape]

steps:
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick wine64

- name: get linux build
uses: actions/download-artifact@v4
with:
name: windows-examples

- name: launch and screenshot
run: |
cd ${{ matrix.example }}
cp ../*.dll .
chmod +x ${{ matrix.example }}.exe
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ./Particles &
MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
Expand All @@ -202,44 +246,11 @@ jobs:
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: screenshot
path: Particles/screenshot.png

# wineRun:
# needs: linuxXwindows
# runs-on: ubuntu-22.04

# steps:
# - name: Install dependencies
# run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick wine32 wine64

# - name: get linux build
# uses: actions/download-artifact@v4
# with:
# name: windows-examples

# - name: launch and screenshot
# run: |
# ls
# cd Particles
# chmod +x Particles.exe
# export DISPLAY=:99
# sudo Xvfb :99 -screen 0 800x600x24 &
# sleep 5
# MESA_GL_VERSION_OVERRIDE=3.3 wine64 Particles.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: screenshot-wine
# path: Particles/screenshot.png
name: ${{ matrix.example }}-wine.png
path: ${{ matrix.example }}/screenshot.png

test-release:
needs: [linuxNative, headers]
needs: [linux, headers]
runs-on: ubuntu-22.04

steps:
Expand All @@ -259,7 +270,7 @@ jobs:
with:
name: linux-x86_64

- name: Install dependencies
- 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 xvfb x11-apps imagemagick

- name: linux lib test
Expand All @@ -274,7 +285,7 @@ jobs:
cmake .. && make

test-release-mingw:
needs: [linuxXwindows, headers]
needs: [windows, headers]
runs-on: ubuntu-22.04

steps:
Expand All @@ -294,7 +305,7 @@ jobs:
with:
name: windows

- name: Install dependencies
- 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 xvfb x11-apps imagemagick

- name: mingw lib test
Expand All @@ -307,7 +318,7 @@ jobs:
./build.sh

test-release-macos:
needs: [macosNative, headers]
needs: [macos, headers]
runs-on: macos-13

steps:
Expand All @@ -327,7 +338,7 @@ jobs:
with:
name: macos

- name: Install dependencies
- name: install dependencies
run: |
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip
unzip vulkan-sdk.zip
Expand All @@ -347,7 +358,7 @@ jobs:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../osx.cmake && make

release:
needs: [linuxNative, linuxXwindows, macosNative]
needs: [linux, windows, macos]
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04

Expand Down
Loading