Skip to content

LWJGL CI configuration #66

LWJGL CI configuration

LWJGL CI configuration #66

Workflow file for this run

name: LWJGL Build
on:
workflow_dispatch:
push:
branches:
- master
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0"
JEMALLOC_PARAMS: --with-jemalloc-prefix=je_ --disable-stats --disable-fill --disable-cxx
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
container:
image: centos:7
strategy:
fail-fast: false
matrix:
ARCH: [x64]
include:
- ARCH: x64
HOST: x86_64-pc-linux-gnu
steps:
- run: |
yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm
yum -y install git
name: Upgrade git
- uses: actions/checkout@v3
with:
fetch-depth: 3
- run: |
yum -y install epel-release
yum -y update
name: Configure yum
- run: |
yum -y install centos-release-scl
yum -y install devtoolset-11-gcc-c++
yum -y install autoconf automake libtool awscli
name: Install build dependencies
- run: |
source scl_source enable devtoolset-11 || true
CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ./autogen.sh ${{env.JEMALLOC_PARAMS}} --disable-initial-exec-tls --host=${{matrix.HOST}} || true
cat config.log
name: Configure build
- run: |
source scl_source enable devtoolset-11 || true
make
strip lib/libjemalloc.so
name: Build
- run: aws s3 cp lib/libjemalloc.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload artifact
- run: |
git config --global --add safe.directory $PWD
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.so.git
aws s3 cp libjemalloc.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload git revision
linux-cross:
name: Linux Cross
runs-on: ubuntu-latest
container:
image: ${{matrix.CONTAINER}}
strategy:
fail-fast: false
matrix:
ARCH: [arm32, arm64, riscv64]
include:
# -----
- ARCH: arm32
CROSS_ARCH: armhf
CONTAINER: ubuntu:18.04
PACKAGES: gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
CC: PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/lib/arm-linux-gnueabihf/pkgconfig CC=arm-linux-gnueabihf-gcc
EXTRA_PARAMS:
HOST: arm-unknown-linux-gnueabihf
STRIP: arm-linux-gnueabihf-strip
# -----
- ARCH: arm64
CROSS_ARCH: arm64
CONTAINER: ubuntu:18.04
PACKAGES: gcc-aarch64-linux-gnu libc6-dev-arm64-cross
CC: PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/lib/aarch64-linux-gnu/pkgconfig CC=aarch64-linux-gnu-gcc
EXTRA_PARAMS: --with-lg-page=14
HOST: aarch64-unknown-linux-gnu
STRIP: aarch64-linux-gnu-strip
# -----
- ARCH: riscv64
CROSS_ARCH: riscv64
CONTAINER: ubuntu:20.04
PACKAGES: gcc-riscv64-linux-gnu libc6-dev-riscv64-cross
CC: PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${CMAKE_SYSROOT}/usr/lib/riscv64-linux-gnu/pkgconfig CC=riscv64-linux-gnu-gcc
EXTRA_PARAMS:
HOST: riscv64-unknown-linux-gnu
STRIP: riscv64-linux-gnu-strip
env:
LWJGL_ARCH: ${{matrix.ARCH}}
steps:
- run: |
apt-get -y update
apt-get -y install software-properties-common
apt-get -y install --reinstall ca-certificates
add-apt-repository -y ppa:git-core/ppa
name: Update apt repositories
if: ${{ matrix.CONTAINER == 'ubuntu:18.04' }}
- run: |
apt-get -y update
apt-get -y upgrade
DEBIAN_FRONTEND=noninteractive apt-get -yq install awscli git autoconf make
name: Upgrade git
- uses: actions/checkout@v3
with:
fetch-depth: 3
- run: apt-get update
name: Prepare cross-compilation
- run: apt-get -yq install ${{matrix.PACKAGES}}
name: Install dependencies
- run: |
${{matrix.CC}} CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" ./autogen.sh ${{env.JEMALLOC_PARAMS}} ${{matrix.EXTRA_PARAMS}} --disable-initial-exec-tls --host=${{matrix.HOST}} || true
cat config.log
name: Configure build
- run: |
make
${{matrix.STRIP}} lib/libjemalloc.so
name: Build
- run: aws s3 cp lib/libjemalloc.so s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload artifact
- run: |
git config --global --add safe.directory $PWD
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.so.git
aws s3 cp libjemalloc.so.git s3://lwjgl-build/nightly/linux/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload git revision
macos:
name: macOS
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
ARCH: [x64, arm64]
include:
- ARCH: x64
CC: MACOSX_DEPLOYMENT_TARGET=10.9 EXTRA_CFLAGS=-mmacosx-version-min=10.9 LDFLAGS=-mmacosx-version-min=10.9
HOST: x86_64-apple-darwin13
EXTRA_PARAMS:
- ARCH: arm64
CC: MACOSX_DEPLOYMENT_TARGET=11.0 EXTRA_CFLAGS="-target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0" LDFLAGS="-target aarch64-apple-darwin -arch arm64 -mmacosx-version-min=11.0"
HOST: aarch64-apple-darwin20
EXTRA_PARAMS: --with-lg-page=14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- run: ${{matrix.CC}} ./autogen.sh ${{env.JEMALLOC_PARAMS}} --disable-initial-exec-tls --disable-zone-allocator --target ${{matrix.ARCH}}-apple-darwin20 --host=${{matrix.HOST}} ${{matrix.EXTRA_PARAMS}}
name: Configure build
- run: |
${{matrix.CC}} make
strip -u -r lib/libjemalloc.dylib
name: Build
- run: aws s3 cp lib/libjemalloc.dylib s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload artifact
- run: |
git log --first-parent --pretty=format:%H HEAD~2..HEAD~1 > libjemalloc.dylib.git
aws s3 cp libjemalloc.dylib.git s3://lwjgl-build/nightly/macosx/${{matrix.ARCH}}/ $S3_PARAMS
name: Upload git revision
windows:
name: Windows
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ARCH: [x86, x64, arm64]
include:
- ARCH: x86
MSVC_ARCH: amd64_x86
HOST: i686-pc-cygwin
CFLAGS:
- ARCH: x64
MSVC_ARCH: amd64
HOST: x86_64-w64-cygwin
CFLAGS:
- ARCH: arm64
MSVC_ARCH: amd64_arm64
HOST: aarch64-w64-cygwin
CFLAGS: /D__aarch64__
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 3
# - id: cygwin-cache
# uses: actions/cache@v2
# with:
# path: C:\cygwin
# key: cygwin-cache
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.MSVC_ARCH}}
- run: |
choco install cygwin -x64 --params "/InstallDir:C:\cygwin"
choco install cyg-get
cyg-get autoconf make
#if: steps.cygwin-cache.outputs.cache-hit != 'true'
name: Install dependencies
- run: C:\cygwin\bin\sh -lc "(cd $OLDPWD;)"
shell: cmd
name: Prepare Cygwin
- run: |
C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; autoconf;)"
C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; CFLAGS='/EHsc /GF /Gy /GL /GR- /GS- /MP /DNDEBUG ${{matrix.CFLAGS}}' CC=cl ac_cv_c_bigendian=no ./configure --host=${{matrix.HOST}} ${{env.JEMALLOC_PARAMS}};)"
shell: cmd
name: Configure build
- run: |
C:\cygwin\bin\sh -lc "(cd $OLDPWD; set -o igncr; make;)"
shell: cmd
name: Build
- run: aws s3 cp lib\jemalloc.dll s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ ${{env.S3_PARAMS}}
shell: cmd
name: Upload artifact
- run: |
git log --first-parent --pretty=format:%%H HEAD~2..HEAD~1 > jemalloc.dll.git
aws s3 cp jemalloc.dll.git s3://lwjgl-build/nightly/windows/${{matrix.ARCH}}/ ${{env.S3_PARAMS}}
shell: cmd
name: Upload git revision