Skip to content

Commit

Permalink
CD: Test different JDK distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
Argent77 committed Apr 24, 2024
1 parent 2d1e0fd commit a233668
Showing 1 changed file with 8 additions and 43 deletions.
51 changes: 8 additions & 43 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [ "master" ]
workflow_dispatch:
branches: [ "master", "devel" ]
branches: [ "master", "devel", "macos-deploy-test" ]

permissions:
contents: read
Expand Down Expand Up @@ -48,10 +48,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ windows-latest, macos-13 ]
os: [ macos-14 ]
java: [ '21' ]
distribution: [ 'temurin', 'corretto', 'oracle' ]
runs-on: ${{ matrix.os }}
name: Create installer for ${{ matrix.os }}, JDK ${{ matrix.java }}
name: Create installer for ${{ matrix.os }}, JDK ${{ matrix.java }} (${{ matrix.distribution }})
steps:
# Initializations
- name: Git checkout
Expand All @@ -61,16 +62,9 @@ jobs:
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Echo JAVA_HOME (windows)
if: startsWith(matrix.os, 'windows-')
run: |
echo $env:JAVA_HOME
java -version
distribution: ${{ matrix.distribution }}

- name: Echo JAVA_HOME (macos)
if: startsWith(matrix.os, 'macos-')
- name: Echo JAVA_HOME
run: |
echo $JAVA_HOME
java -version
Expand All @@ -89,50 +83,21 @@ jobs:
path: assets

# Building
- name: Build portable archive and installer (windows)
if: startsWith(matrix.os, 'windows-')
run: |
move assets\redistributable\windows\package .
move assets\redistributable\windows\build-image.cmd .
move assets\redistributable\windows\build-installer.cmd .
.\build-image.cmd
.\build-installer.cmd
- name: Build installer (macos)
if: startsWith(matrix.os, 'macos-')
- name: Build installer
run: |
mv assets/redistributable/macos/package .
mv assets/redistributable/macos/build.command .
chmod +x build.command
./build.command
# Validation
- name: List built files (windows)
if: startsWith(matrix.os, 'windows-')
run: dir

- name: List built files (macos)
if: startsWith(matrix.os, 'macos-')
run: ls -l

# Uploading
- name: Upload portable artifact (windows)
if: startsWith(matrix.os, 'windows-')
uses: actions/upload-artifact@v4
with:
name: portable-windows
path: NearInfinity-*.zip

- name: Upload exe artifact (windows)
if: startsWith(matrix.os, 'windows-')
uses: actions/upload-artifact@v4
with:
name: installer-windows
path: NearInfinity-*.exe

- name: Upload pkg artifact (macos)
if: startsWith(matrix.os, 'macos-')
uses: actions/upload-artifact@v4
with:
name: installer-macos-x86_64
name: installer-macos-arm64-${{ matrix.distribution }}
path: NearInfinity-*.pkg

0 comments on commit a233668

Please sign in to comment.