CI: update to Java 17 (and 20) #868
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
ubuntu-java-17: | |
name: Ubuntu (Java 17) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Install dependencies | |
run: sudo npm install -g less | |
- name: Build with Maven | |
run: mvn clean package | |
- name: Create package | |
run: | | |
cd phoenicis-dist/src/scripts | |
bash phoenicis-create-package.sh | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Ubuntu | |
path: phoenicis-dist/target/*.deb | |
if-no-files-found: error | |
ubuntu-java-20: | |
name: Ubuntu (Java 20) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 20 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '20' | |
cache: 'maven' | |
- name: Install dependencies | |
run: sudo npm install -g less | |
- name: Build with Maven | |
run: mvn clean package | |
flatpak: | |
name: Flatpak | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Install dependencies | |
run: sudo npm install -g less | |
- name: Build with Maven | |
run: mvn clean package -DskipTests # no need to run tests again | |
- name: Install Flatpak dependencies | |
run: | | |
sudo apt-get install -y flatpak flatpak-builder elfutils | |
flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
flatpak --user -y install flathub org.freedesktop.Platform/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Sdk/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Sdk.Compat.i386/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Sdk.Extension.toolchain-i386/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Sdk.Extension.openjdk11/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Platform.Compat.i386/x86_64/22.08 | |
flatpak --user -y install flathub org.freedesktop.Platform.GL32.nvidia-460-39/x86_64/1.4 | |
- name: Build flatpak | |
run: | | |
cd phoenicis-dist/src/flatpak | |
flatpak-builder build-dir org.phoenicis.playonlinux.yml --force-clean | |
macos-java-17: | |
name: Mac OS (Java 17) | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Install dependencies | |
run: sudo npm install -g less | |
- name: Build with Maven | |
run: mvn clean package | |
- name: Create package | |
run: | | |
cd phoenicis-dist/src/scripts | |
bash phoenicis-create-package.sh | |
#- uses: actions/upload-artifact@v3 | |
# with: | |
# name: Mac OS | |
# path: phoenicis-dist/target/packages/*.app | |
# if-no-files-found: error |