Skip to content

Commit

Permalink
Add dll, run all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Nov 24, 2024
1 parent 68af9af commit 2987562
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,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 Down Expand Up @@ -177,6 +179,10 @@ jobs:
needs: linux
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
Expand All @@ -189,12 +195,12 @@ 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 ./Particles &
MESA_GL_VERSION_OVERRIDE=3.3 ./${{ matrix.example }} &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
Expand All @@ -203,16 +209,20 @@ jobs:
- name: upload artifact
uses: actions/upload-artifact@v4
with:
name: screenshot
path: Particles/screenshot.png
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 wine32 wine64
run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick wine64

- name: get linux build
uses: actions/download-artifact@v4
Expand All @@ -221,12 +231,13 @@ jobs:

- name: launch and screenshot
run: |
cd Particles
chmod +x Particles.exe
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 wine64 Particles.exe &
MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe &
export PID=$!
sleep 10
xwd -root -silent | convert xwd:- png:screenshot.png
Expand All @@ -235,8 +246,8 @@ jobs:
- 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: [linux, headers]
Expand Down
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ then
done
echo -e "###############\n"

dll=()

dll=("libgcc_s_seh-1.dll"
"libstdc++-6.dll"
"libwinpthread-1.dll"
)
for j in "${dll[@]}"
do
findAndCopyDLL $j || echo "Could not find $j"
Expand Down

0 comments on commit 2987562

Please sign in to comment.