LWJGL Snapshot #110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Produces a new build, uploads it to S3 and publishes a Maven snapshot | |
name: LWJGL Snapshot | |
on: | |
workflow_dispatch: | |
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 }} | |
ORG_GRADLE_PROJECT_signingKeyId: 9B1FB0FC | |
ORG_GRADLE_PROJECT_signingKey: | | |
${{ secrets.SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PWD }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PWD }} | |
S3_PARAMS: --cache-control "public,must-revalidate,proxy-revalidate,max-age=0" | |
ANT_OPTS: -Xmx8G | |
LWJGL_BUILD_TYPE: nightly | |
ZULU_BUILD: 82.0.21-ca-jdk8.0.432 | |
ZULU_BUILD21: 38.21-ca-jdk21.0.5 | |
jobs: | |
macos: | |
name: Snapshot | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Retrieve build number | |
run: | | |
LWJGL_VERSION=$(cat gradle.properties | grep lwjglVersion= | cut -d= -f2) | |
echo "LWJGL_VERSION=$LWJGL_VERSION" >> $GITHUB_ENV | |
aws s3 cp s3://lwjgl-build/ci/next-build.txt . | |
LWJGL_BUILD=$(cat next-build.txt) | |
echo "LWJGL_BUILD=$LWJGL_BUILD" >> $GITHUB_ENV | |
- name: Install dependencies | |
run: | | |
git clone https://github.com/LWJGL-CI/OculusSDK.git ../OculusSDK | |
mkdir jdk8 | |
mkdir jdk21 | |
curl -L https://cdn.azul.com/zulu/bin/zulu8.${ZULU_BUILD}-linux_x64.tar.gz | tar xz -C jdk8 --strip-components 1 | |
curl -L https://cdn.azul.com/zulu/bin/zulu21.${ZULU_BUILD21}-linux_x64.tar.gz | tar xz -C jdk21 --strip-components 1 | |
- name: Generate bindings | |
run: JAVA_HOME=$(pwd)/jdk8 ant -emacs hydrate-kotlinc clean-generated generate | |
- name: Build Java | |
run: JAVA_HOME=$(pwd)/jdk8 ant -emacs compile | |
- name: "Package ${{env.LWJGL_VERSION}}-snapshot+${{env.LWJGL_BUILD}}" | |
run: | | |
export JAVA_HOME=$(pwd)/jdk21 | |
JAVA8_HOME=$(pwd)/jdk8 ANT_OPTS="$ANT_OPTS -Djava.security.manager=allow" ant -emacs release -Dbuild.revision=${{env.LWJGL_BUILD}} | |
$JAVA_HOME/bin/jar cfM lwjgl.zip -C bin/RELEASE . | |
- name: Upload snapshot to S3 | |
run: | | |
aws s3 cp lwjgl.zip s3://lwjgl-build/nightly/lwjgl.zip $S3_PARAMS | |
aws s3 sync bin/RELEASE s3://lwjgl-build/nightly/bin --delete $S3_PARAMS | |
- name: Publish snapshot to Maven | |
run: | | |
export JAVA_HOME=$(pwd)/jdk8 | |
./gradlew -Psnapshot publish | |
- name: Bump build number | |
run: | | |
echo -n $((LWJGL_BUILD+1)) > next-build.txt | |
echo "Next build will be #$(cat next-build.txt)" | |
aws s3 cp next-build.txt s3://lwjgl-build/ci/ |