Skip to content

Commit

Permalink
Combine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Nov 24, 2024
1 parent 1f7d2e7 commit a0c6957
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 276 deletions.
86 changes: 0 additions & 86 deletions .github/workflows/build-tests.yml

This file was deleted.

100 changes: 51 additions & 49 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,11 @@ jobs:
path: macos-examples

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

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 Down Expand Up @@ -205,41 +208,40 @@ jobs:
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
wineRun:
needs: windows
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: |
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

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

steps:
Expand All @@ -259,7 +261,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 +276,7 @@ jobs:
cmake .. && make
test-release-mingw:
needs: [linuxXwindows, headers]
needs: [windows, headers]
runs-on: ubuntu-22.04

steps:
Expand All @@ -294,7 +296,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 +309,7 @@ jobs:
./build.sh
test-release-macos:
needs: [macosNative, headers]
needs: [macos, headers]
runs-on: macos-13

steps:
Expand All @@ -327,7 +329,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 +349,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
82 changes: 0 additions & 82 deletions .github/workflows/run-tests.yml

This file was deleted.

Loading

0 comments on commit a0c6957

Please sign in to comment.