LWJGL Snapshot #106
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: 80.0.17-ca-jdk8.0.422 | |
ZULU_BUILD21: 36.17-ca-jdk21.0.4 | |
jobs: | |
macos: | |
name: Snapshot | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- run: | | |
aws s3 cp s3://lwjgl-build/ci/next-build.txt . | |
LWJGL_BUILD=$(cat next-build.txt) | |
echo "LWJGL_BUILD=$LWJGL_BUILD" >> $GITHUB_ENV | |
name: Retrieve build number | |
- 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: Install dependencies | |
- run: JAVA_HOME=$(pwd)/jdk8 ant -emacs hydrate-kotlinc clean-generated generate | |
name: Generate bindings | |
- run: JAVA_HOME=$(pwd)/jdk8 ant -emacs compile | |
name: Build Java | |
- 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: "Package snapshot #${{env.LWJGL_BUILD}}" | |
- 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: Upload snapshot to S3 | |
- run: | | |
export JAVA_HOME=$(pwd)/jdk8 | |
./gradlew -Psnapshot publish | |
name: Publish snapshot to Maven | |
- 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/ | |
name: Bump build number |