Skip to content

feat(liburing) update to 2.5 #5

feat(liburing) update to 2.5

feat(liburing) update to 2.5 #5

Workflow file for this run

# Builds LWJGL and runs tests.
# No artifacts are uploaded, see LWJGL-CI/lwjgl3 for that.
name: LWJGL Build
on:
workflow_dispatch:
push:
branches:
- master
env:
JAVA_HOME: jdk8
ANT_OPTS: -Xmx1G
LWJGL_BUILD_TYPE: nightly
jobs:
cache-kotlinc:
name: Compile templates and cache kotlinc output
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Download JDK
run: |
mkdir jdk8
curl https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-jdk8.0.382-linux_x64.tar.gz | tar xz -C jdk8 --strip-components 1
- name: Compile templates
run: |
git clone https://github.com/LWJGL-CI/OculusSDK.git ../OculusSDK
ANT_OPTS=-Xmx4G ant -emacs compile-templates -Dbackend-threads=0
- name: Cache kotlinc output
uses: actions/cache/save@v3
with:
path: |
bin/classes/generator
bin/classes/templates
key: cache-kotlinc-${{ github.sha }}
enableCrossOsArchive: true
linux:
name: Linux
needs: cache-kotlinc
runs-on: ubuntu-latest
container:
image: centos:7
strategy:
fail-fast: false
matrix:
ARCH: [x64]
include:
- ARCH: x64
PACKAGES: libX11-devel libXt-devel gtk3-devel libdbus-1-dev
steps:
- name: Upgrade git
run: |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum -y install git
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Configure yum
run: |
yum -y install epel-release
yum -y update
- name: Install build dependencies
run: |
yum -y install centos-release-scl
yum -y install devtoolset-11-gcc-c++
yum -y install ant awscli zstd
- name: Install LWJGL dependencies
run: |
yum -y install ${{matrix.PACKAGES}}
mkdir jdk8
curl -L https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-linux_x64.tar.gz | tar xz -C jdk8 --strip-components 1
- name: Restore kotlinc output
uses: actions/cache/restore@v3
with:
path: |
bin/classes/generator
bin/classes/templates
key: cache-kotlinc-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Generate bindings
run: ant -emacs clean-generated generate
- name: Build Java
run: ant -emacs compile
- name: Build native
run: |
source scl_source enable devtoolset-11 || true
ant -emacs compile-native
- name: Run tests
run: |
source scl_source enable devtoolset-11 || true
ant -emacs tests
- name: Run demo with OpenJDK
run: |
source scl_source enable devtoolset-11 || true
ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
- name: Build GraalVM Native Image
run: |
source scl_source enable devtoolset-11 || true
mkdir jdk-graalvm-21
curl -L https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_linux-x64_bin.tar.gz | tar xz -C jdk-graalvm-21 --strip-components 1
jdk-graalvm-21/bin/native-image -cp \
bin/classes/lwjgl/core:\
bin/classes/lwjgl/lz4:\
bin/classes/samples:\
modules/samples/src/test/resources:\
bin/libs/java/joml.jar:\
bin/libs/native:\
config/native-image \
org.lwjgl.demo.util.lz4.HelloLZ4 --verbose --no-fallback
- name: Run demo with GraalVM JIT
run: |
source scl_source enable devtoolset-11 || true
JAVA_HOME=jdk-graalvm-21 ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
- name: Run demo with GraalVM Native Image
run: ./org.lwjgl.demo.util.lz4.hellolz4
linux-cross:
name: Linux Cross
needs: cache-kotlinc
runs-on: ubuntu-latest
container:
image: ubuntu:18.04
strategy:
fail-fast: false
matrix:
ARCH: [arm32, arm64]
include:
- ARCH: arm32
PACKAGES: gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf libc6-dev-armhf-cross
CROSS_ARCH: armhf
CROSS_PACKAGES: libgtk-3-dev:armhf libatk-bridge2.0-dev:armhf libgdk-pixbuf2.0-dev:armhf libglu-dev:armhf libgl1-mesa-glx:armhf libx11-dev:armhf libxt-dev:armhf libdbus-1-dev:armhf
NATIVE_PARAMS: -Dgcc.libpath.opengl=/usr/lib/arm-linux-gnueabihf/mesa
- ARCH: arm64
PACKAGES: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
CROSS_ARCH: arm64
CROSS_PACKAGES: libgtk-3-dev:arm64 libatk-bridge2.0-dev:arm64 libgdk-pixbuf2.0-dev:arm64 libglu-dev:arm64 libgl1-mesa-glx:arm64 libx11-dev:arm64 libxt-dev:arm64 libdbus-1-dev:arm64
NATIVE_PARAMS: -Dgcc.libpath.opengl=/usr/lib/aarch64-linux-gnu/mesa
env:
LWJGL_BUILD_ARCH: ${{matrix.ARCH}}
steps:
- name: Upgrade git
run: |
apt-get -y update
apt-get -y install software-properties-common
apt-get -y install --reinstall ca-certificates
apt-get -y update
apt-get -y upgrade
add-apt-repository -y ppa:git-core/ppa
apt-get -y update
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Install dependencies
run: |
git config --global --add safe.directory $(pwd)
DEBIAN_FRONTEND=noninteractive apt-get -yq install ant awscli curl zstd ${{matrix.PACKAGES}}
mkdir jdk8
curl -L https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-linux_x64.tar.gz | tar xz -C jdk8 --strip-components 1
- name: Prepare cross-compilation
run: |
sed -i 's/deb http/deb [arch=amd64,i386] http/' /etc/apt/sources.list
grep "ubuntu.com/ubuntu" /etc/apt/sources.list | tee /etc/apt/sources.list.d/ports.list
sed -i 's/amd64,i386/armhf,arm64/' /etc/apt/sources.list.d/ports.list
sed -i 's#http://.*/ubuntu#http://ports.ubuntu.com/ubuntu-ports#' /etc/apt/sources.list.d/ports.list
dpkg --add-architecture ${{matrix.CROSS_ARCH}}
apt-get clean
apt-get update || true
- name: Install cross-compilation dependencies
run: apt-get -yq -f --allow-unauthenticated --no-install-suggests --no-install-recommends install ${{matrix.CROSS_PACKAGES}} -o Dpkg::Options::="--force-overwrite"
- name: Restore kotlinc output
uses: actions/cache/restore@v3
with:
path: |
bin/classes/generator
bin/classes/templates
key: cache-kotlinc-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Generate bindings
run: ant -emacs clean-generated generate
- name: Build Java
run: ant -emacs compile
- name: Build native
run: ant -emacs compile-native ${{matrix.NATIVE_PARAMS}}
macos:
name: macOS
needs: cache-kotlinc
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ARCH: [x64, arm64]
env:
LWJGL_BUILD_ARCH: ${{matrix.ARCH}}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Install dependencies
run: |
mkdir jdk8
curl -L https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-macosx_x64.tar.gz | tar xz -C jdk8 --strip-components 1
- name: Restore kotlinc output
uses: actions/cache/restore@v3
with:
path: |
bin/classes/generator
bin/classes/templates
key: cache-kotlinc-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Generate bindings
run: ant -emacs clean-generated generate
- name: Build Java
run: ant -emacs compile
- name: Build native
run: ant -emacs compile-native
- name: Run tests
run: ant -emacs tests
if: matrix.ARCH == 'x64'
- name: Run demo with OpenJDK
run: ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
if: matrix.ARCH == 'x64'
- name: Build GraalVM Native Image
run: |
mkdir jdk-graalvm-21
curl -L https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_macos-x64_bin.tar.gz | tar xz -C jdk-graalvm-21 --strip-components 1
jdk-graalvm-21/Contents/Home/bin/native-image -cp \
bin/classes/lwjgl/core:\
bin/classes/lwjgl/lz4:\
bin/classes/samples:\
modules/samples/src/test/resources:\
bin/libs/java/joml.jar:\
bin/libs/native:\
config/native-image \
org.lwjgl.demo.util.lz4.HelloLZ4 --verbose --no-fallback
if: matrix.ARCH == 'x64'
- name: Run demo with GraalVM JIT
run: JAVA_HOME=jdk-graalvm-21/Contents/Home ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
if: matrix.ARCH == 'x64'
- name: Run demo with GraalVM Native Image
run: ./org.lwjgl.demo.util.lz4.hellolz4
if: matrix.ARCH == 'x64'
windows:
name: Windows
needs: cache-kotlinc
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ARCH: [x86, x64, arm64]
include:
- ARCH: x86
MSVC_ARCH: amd64_x86
- ARCH: x64
MSVC_ARCH: amd64
- ARCH: arm64
MSVC_ARCH: amd64_arm64
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 3
- name: Configure MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.MSVC_ARCH }}
- name: Clone Oculus SDK
run: git clone https://github.com/LWJGL-CI/OculusSDK.git ../OculusSDK
if: contains(matrix.ARCH, 'arm') != true
- name: Install dependencies
run: |
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-win_x64.zip -OutFile jdk.zip
Expand-Archive -Path jdk.zip -DestinationPath .\
Rename-Item zulu8.72.0.17-ca-fx-jdk8.0.382-win_x64 jdk8
- name: Restore kotlinc output
uses: actions/cache/restore@v3
with:
path: |
bin/classes/generator
bin/classes/templates
key: cache-kotlinc-${{ github.sha }}
enableCrossOsArchive: true
fail-on-cache-miss: true
- name: Generate bindings
run: ant -emacs clean-generated generate
shell: cmd
- name: Build Java
run: ant -emacs compile
shell: cmd
- name: Switch to x86 JDK
run: |
Remove-Item -Recurse jdk8
Invoke-WebRequest https://cdn.azul.com/zulu/bin/zulu8.72.0.17-ca-fx-jdk8.0.382-win_i686.zip -OutFile jdk.zip
Expand-Archive -Path jdk.zip -DestinationPath .\
Rename-Item zulu8.72.0.17-ca-fx-jdk8.0.382-win_i686 jdk8
if: matrix.ARCH == 'x86'
- name: Build native
run: |
set LWJGL_BUILD_ARCH=${{matrix.ARCH}}
ant -emacs compile-native
shell: cmd
- name: Run tests
run: ant -emacs tests
shell: cmd
if: contains(matrix.ARCH, 'arm') != true
- name: Print test results
run: type bin\test\testng-results.xml
shell: cmd
if: failure()
- name: Run demo with OpenJDK
run: ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
shell: cmd
if: matrix.ARCH == 'x64'
- name: Download GraalVM
run: |
Invoke-WebRequest https://download.oracle.com/graalvm/21/latest/graalvm-jdk-21_windows-x64_bin.zip -OutFile jdk-graalvm.zip
Expand-Archive -Path jdk-graalvm.zip -DestinationPath .\
Get-ChildItem graalvm-jdk-21* | Rename-Item -newname jdk-graalvm-21
if: matrix.ARCH == 'x64'
- name: Build GraalVM Native Image
run: |
jdk-graalvm-21\bin\native-image -cp ^
bin/classes/lwjgl/core;^
bin/classes/lwjgl/lz4;^
bin/classes/samples;^
modules/samples/src/test/resources;^
bin/libs/java/joml.jar;^
bin/libs/native;^
config/native-image ^
org.lwjgl.demo.util.lz4.HelloLZ4 --verbose --no-fallback
shell: cmd
if: matrix.ARCH == 'x64'
- name: Run demo with GraalVM JIT
run: |
set JAVA_HOME=jdk-graalvm-21
ant demo -Dclass=org.lwjgl.demo.util.lz4.HelloLZ4
shell: cmd
if: matrix.ARCH == 'x64'
- name: Run demo with GraalVM Native Image
run: org.lwjgl.demo.util.lz4.hellolz4.exe
shell: cmd
if: matrix.ARCH == 'x64'