Linux arm64 #186
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Desktop Distribution | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
release: | |
types: [published] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
checks: write | |
actions: read | |
issues: read | |
packages: write | |
pull-requests: read | |
repository-projects: read | |
statuses: read | |
jobs: | |
build-on-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: | | |
11 | |
17 | |
cache: 'gradle' | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageReleaseDistributionForCurrentOS composeApp:packageReleaseUberJarForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: | | |
composeApp/build/compose/binaries/main-release/exe/* | |
composeApp/build/compose/jars/*.jar | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: "composeApp/build/compose/binaries/main-release/exe/*;composeApp/build/compose/jars/*.jar" | |
build-on-macos: | |
strategy: | |
matrix: | |
os: [ macos-latest, macos-13 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: | | |
11 | |
17 | |
cache: 'gradle' | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageReleaseDistributionForCurrentOS composeApp:packageReleaseUberJarForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: | | |
composeApp/build/compose/binaries/main-release/dmg/* | |
composeApp/build/compose/jars/*.jar | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: "composeApp/build/compose/binaries/main-release/dmg/*;composeApp/build/compose/jars/*.jar" | |
build-on-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout my repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Setup Java JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: | | |
11 | |
17 | |
cache: 'gradle' | |
- name: Install FUSE (linux) | |
uses: ConorMacBride/[email protected] | |
with: | |
apt: libfuse2 | |
- name: Package Distribution | |
run: | | |
./gradlew composeApp:packageReleaseDistributionForCurrentOS composeApp:packageReleaseUberJarForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: | | |
composeApp/build/appimage/main-release/mahjong-utils-app.AppImage | |
composeApp/build/compose/jars/*.jar | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: "composeApp/build/appimage/main-release/*.AppImage;composeApp/build/compose/jars/*.jar" | |
build-on-linux-arm64: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Run the build process with Docker | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: gradle:jdk17 | |
options: | | |
--platform linux/arm64 | |
--volume ${{ github.workspace }}/:/tmp/project | |
run: | | |
apt update && apt install libfuse2 -y | |
cd /tmp/project | |
./gradlew composeApp:packageReleaseDistributionForCurrentOS composeApp:packageReleaseUberJarForCurrentOS | |
- name: Upload the Build Artifact | |
uses: actions/[email protected] | |
with: | |
name: distribution | |
path: | | |
composeApp/build/appimage/main-release/mahjong-utils-app.AppImage | |
composeApp/build/compose/jars/*.jar | |
- name: Upload Release Assets | |
if: ${{ github.event_name == 'release' }} | |
uses: AButler/[email protected] | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
files: "composeApp/build/appimage/main-release/*.AppImage;composeApp/build/compose/jars/*.jar" |