Skip to content

Adds sprite atlasing offsets #114

Adds sprite atlasing offsets

Adds sprite atlasing offsets #114

Workflow file for this run

name: jGL release
on:
push:
branches: [ "main" ]
tags: 'v*'
paths-ignore:
- 'doc/**'
- '.github/**'
workflow_dispatch:
jobs:
headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: pack headers
run: |
ls
mkdir headers
for inc in include/jGL \
include/jLog \
include/jThread \
include/*.h \
include/vendored/freetype/include/* \
include/vendored/glew/include/GL \
include/vendored/glfw/include/GLFW \
include/vendored/glm/glm \
include/vendored/stduuid/include/uuid.h \
include/vendored/stduuid/gsl \
include/vendored/stb_image.h;\
do cp -r $inc headers; done
ls headers
- name: pack headers mingw
run: |
ls
mkdir headers-mingw
cp -r headers/* headers-mingw
mkdir headers-mingw/VulkanSDK
cp -r include/vendored/VulkanSDK/Include headers-mingw/VulkanSDK/
cp -r include/vendored/VulkanSDK/Windows headers-mingw/VulkanSDK/
ls headers-mingw
- name: build header artifact
uses: actions/upload-artifact@v4
with:
name: headers
path: headers
- name: build header-mingw artifact
uses: actions/upload-artifact@v4
with:
name: headers-mingw
path: headers-mingw
linuxNative:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- 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
run: |
./build.sh -t -r -e
mkdir linux-x86_64
cp -r build/Examples linux-x86_64-examples
cp build/libjGL.a linux-x86_64/libjGL-linux-x86_64.a
cp LICENSE linux-x86_64-examples/
cp LICENSE linux-x86_64/
- name: 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
run: |
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ctest --exclude-regex Vulkan --extra-verbose --output-on-failure
- name: build artifact
uses: actions/upload-artifact@v4
with:
name: linux-x86_64
path: linux-x86_64
- name: build examples artifact
uses: actions/upload-artifact@v4
with:
name: linux-x86_64-examples
path: linux-x86_64-examples
linuxXwindows:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- 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
run: |
./build.sh -t -w -r -e
mkdir windows
cp -r build/Examples windows-examples
cp build/libjGL.a windows/libjGL-windows.a
cp LICENSE windows-examples/
cp LICENSE windows/
- name: build artifact
uses: actions/upload-artifact@v4
with:
name: windows
path: windows
- name: build examples artifact
uses: actions/upload-artifact@v4
with:
name: windows-examples
path: windows-examples
macosNative:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install dependencies
run: |
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg
hdiutil attach vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
mkdir ~/vulkan
cd /Volumes/vulkan-sdk/
sudo ./InstallVulkan.app/Contents/macOS/InstallVulkan --root ~/vulkan --accept-licenses --default-answer --confirm-command install
ls ~/vulkan
cd ~/vulkan/
python install_vulkan.py
- name: macos-macos
run: |
./build.sh -o -e -r
mkdir macos
cp -r build/Examples macos-examples
cp build/libjGL.a macos/libjGL-macos.a
cp LICENSE macos-examples/
cp LICENSE macos/
- name: build artifact
uses: actions/upload-artifact@v4
with:
name: macos
path: macos
- name: build examples artifact
uses: actions/upload-artifact@v4
with:
name: macos-examples
path: macos-examples
linuxRun:
needs: linuxNative
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick
- name: get linux build
uses: actions/download-artifact@v4
with:
name: linux-x86_64-examples
- name: launch and screenshot
run: |
ls
cd Particles
chmod +x Particles
export DISPLAY=:99
sudo Xvfb :99 -screen 0 800x600x24 &
sleep 5
MESA_GL_VERSION_OVERRIDE=3.3 ./Particles &
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
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
test-release:
needs: [linuxNative, headers]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: get headers
uses: actions/download-artifact@v4
with:
name: headers
path: headers/
- name: get linux build
uses: actions/download-artifact@v4
with:
name: linux-x86_64
- 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
run: |
ls
mkdir tests/regression/user/include/
cp libjGL-linux-x86_64.a tests/regression/user/libjGL.a
cp -r headers/* tests/regression/user/include/
cd tests/regression/user
ls
mkdir build && cd build
cmake .. && make
test-release-mingw:
needs: [linuxXwindows, headers]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: get headers
uses: actions/download-artifact@v4
with:
name: headers-mingw
path: headers/
- name: get windows build
uses: actions/download-artifact@v4
with:
name: windows
- 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
run: |
ls
mkdir tests/regression/user-mingw/include/
cp libjGL-windows.a tests/regression/user-mingw/libjGL.a
cp -r headers/* tests/regression/user-mingw/include/
cd tests/regression/user-mingw
./build.sh
test-release-macos:
needs: [macosNative, headers]
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: get headers
uses: actions/download-artifact@v4
with:
name: headers
path: headers/
- name: get macos build
uses: actions/download-artifact@v4
with:
name: macos
- name: Install dependencies
run: |
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg
hdiutil attach vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
mkdir ~/vulkan
cd /Volumes/vulkan-sdk/
sudo ./InstallVulkan.app/Contents/macOS/InstallVulkan --root ~/vulkan --accept-licenses --default-answer --confirm-command install
ls ~/vulkan
cd ~/vulkan/
python install_vulkan.py
- name: macos lib test
run: |
ls
mkdir tests/regression/user-macos/include/
cp libjGL-macos.a tests/regression/user-macos/libjGL.a
cp -r headers/* tests/regression/user-macos/include/
cd tests/regression/user-macos
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=../osx.cmake && make
release:
needs: [linuxNative, linuxXwindows, macosNative]
if: github.ref_type == 'tag'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: get headers
uses: actions/download-artifact@v4
with:
name: headers
path: headers/
- name: get linux build
uses: actions/download-artifact@v4
with:
name: linux-x86_64
# - name: get windows build
# uses: actions/download-artifact@v4
# with:
# name: windows
# - name: get macos build
# uses: actions/download-artifact@v4
# with:
# name: macos
- name: pack
run: |
ls
mkdir jGL
mv *.a jGL/
mv headers/* jGL/
mv LICENSE jGL/
zip -r jGL.zip jGL/*
# https://github.com/softprops/action-gh-release
- name: release
uses: softprops/action-gh-release@v2
with:
draft: true
prerelease: true
name: "release-${{ github.ref_name }}"
tag_name: ${{ github.ref }}
files: jGL.zip