Merge main into system-file-chooser #143
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
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Native Libraries | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '[0-9]*' | |
paths: | |
- 'flatlaf-natives/**' | |
- '.github/workflows/natives.yml' | |
- 'gradle/wrapper/gradle-wrapper.properties' | |
- '!**.md' | |
- '!**/.settings/**' | |
jobs: | |
Natives: | |
strategy: | |
matrix: | |
os: | |
- windows-latest | |
- macos-latest | |
- ubuntu-latest | |
- ubuntu-24.04-arm | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v4 | |
- name: install libxt-dev and libgtk-3-dev | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' | |
run: sudo apt install libxt-dev libgtk-3-dev | |
- name: Download libgtk-3.so for arm64 | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: flatlaf-natives/flatlaf-natives-linux/lib/aarch64 | |
run: | | |
pwd | |
ls -l /usr/lib/x86_64-linux-gnu/libgtk* | |
wget --no-verbose https://ports.ubuntu.com/pool/main/g/gtk%2b3.0/libgtk-3-0_3.24.18-1ubuntu1_arm64.deb | |
ls -l | |
ar -x libgtk-3-0_3.24.18-1ubuntu1_arm64.deb data.tar.xz | |
tar -xvf data.tar.xz --wildcards --to-stdout "./usr/lib/aarch64-linux-gnu/libgtk-3.so.0.*" > libgtk-3.so | |
rm libgtk-3-0_3.24.18-1ubuntu1_arm64.deb data.tar.xz | |
ls -l | |
- name: install g++-aarch64-linux-gnu | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt install g++-aarch64-linux-gnu | |
- name: Setup Java 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: temurin | |
cache: gradle | |
- name: Build with Gradle | |
# --no-daemon is necessary on Windows otherwise caching Gradle would fail with: | |
# tar.exe: Couldn't open ~/.gradle/caches/modules-2/modules-2.lock: Permission denied | |
run: ./gradlew build-natives --no-daemon | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: FlatLaf-natives-build-artifacts-${{ matrix.os }} | |
path: | | |
flatlaf-core/src/main/resources/com/formdev/flatlaf/natives | |
flatlaf-natives/flatlaf-natives-*/build |