Merge pull request #266 from AppleCommander/a2geek-patch-1

A2geek patch 1
This commit is contained in:
A2 Geek authored and GitHub committed 2026-07-25 14:18:12 -05:00
commit 51bfbdbf44
4 files changed
+125 -153

No files matched your search

+125
View File
@@ -0,0 +1,125 @@
name: GraalVM Native Image builds
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
jobs:
build-java:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build with Gradle
env:
# The SWT image tests fail in the pipeline; disable them.
AC_SKIP_SWT_TESTS: true
run: ./gradlew build
- name: Upload 'ac'
uses: actions/upload-artifact@v7
with:
name: build-artifacts
path: app/cli-ac/build/libs/AppleCommander-ac*
archive: false
if-no-files-found: error
- name: Upload 'acx'
uses: actions/upload-artifact@v7
with:
name: build-artifacts
path: app/cli-acx/build/libs/AppleCommander-acx*
archive: false
if-no-files-found: error
# This is a crude license header check. The ones I tested were susceptible to whitespace differences
# and I never got them to work. My primary goal is to ensure the headers exist, so this suffices.
license-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Look for license phrase
run: |
outfile=$(mktemp)
find . -name "*.java" -not -name "Sleak.java" | xargs grep -L "GNU General Public License" > ${outfile}
if [ -s "${outfile}" ]
then
echo "License headers missing on the following files:"
cat ${outfile}
exit 1
else
echo "License headers appear to be valid!"
fi
build-native:
name: ac/acx on ${{ matrix.os }}-${{ matrix.arch }}
needs: [build-java, license-check]
runs-on: ${{ matrix.label }}
strategy:
matrix:
# Note that Graal v21 builds to the current architecture, and "--target" is not functional.
# Therefore, we try to find runners that fit our targets.
# See: https://docs.github.com/en/actions/concepts/runners/about-github-hosted-runners#overview-of-github-hosted-runners
# ... and follow the links to the related GitHub repositories
include:
- label: ubuntu-latest
os: linux
arch: x86_64
- label: ubuntu-24.04-arm
os: linux
arch: aarch64
- label: windows-latest
os: windows
arch: x86_64
- label: macos-15-intel
os: darwin
arch: x86_64
- label: macos-15
os: darwin
arch: arm64
steps:
- uses: actions/checkout@v7
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'liberica'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build ac/acx
run: ./gradlew nativeCompile
env:
# Needed for Windows; not an issue for other OSes
GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }}
- name: Run UPX
uses: crazy-max/ghaction-upx@v4
if: runner.os == 'Windows' || runner.os == 'Linux'
with:
files: |
app/cli-ac/build/native/nativeCompile/ac-*
app/cli-acx/build/native/nativeCompile/acx-*
- name: Run CLTH tests
if: ${{ matrix.os != 'windows' }}
shell: bash
run: ./scripts/run-clth-tests.sh
- name: Upload binary
uses: actions/upload-artifact@v7
with:
name: ac-${{ matrix.os }}-${{ matrix.arch }}
path: app/cli-ac/build/native/nativeCompile/ac-*
archive: false
- name: Upload binary
uses: actions/upload-artifact@v7
with:
name: acx-${{ matrix.os }}-${{ matrix.arch }}
path: app/cli-acx/build/native/nativeCompile/acx-*
archive: false
-50
View File
@@ -1,50 +0,0 @@
# 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: Build AppleCommander
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Build with Gradle
env:
# The SWT image tests fail in the pipeline; disable them.
AC_SKIP_SWT_TESTS: true
run: ./gradlew build
- name: Collect artifacts
run: |
mkdir artifacts
cp $(find app/ -name "AppleCommander-*.jar") artifacts/
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: build-artifacts
path: artifacts/
if-no-files-found: error
-36
View File
@@ -1,36 +0,0 @@
# This is a crude license header check. The ones I tested were susceptible to whitespace differences
# and I never got them to work. My primary goal is to ensure the headers exist, so this suffices.
name: Verify AppleCommander has a license header
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Look for license phrase
run: |
outfile=$(mktemp)
find . -name "*.java" -not -name "Sleak.java" | xargs grep -L "GNU General Public License" > ${outfile}
if [ -s "${outfile}" ]
then
echo "License headers missing on the following files:"
cat ${outfile}
exit 1
else
echo "License headers appear to be valid!"
fi
-67
View File
@@ -1,67 +0,0 @@
name: GraalVM Native Image builds
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
jobs:
build:
name: ac/acx on ${{ matrix.os }}-${{ matrix.arch }}
runs-on: ${{ matrix.label }}
strategy:
matrix:
# Note that Graal v21 builds to the current architecture, and "--target" is not functional.
# Therefore, we try to find runners that fit our targets.
# See: https://docs.github.com/en/actions/concepts/runners/about-github-hosted-runners#overview-of-github-hosted-runners
# ... and follow the links to the related GitHub repositories
include:
- label: ubuntu-latest
os: linux
arch: x86_64
- label: ubuntu-24.04-arm
os: linux
arch: aarch64
- label: windows-latest
os: windows
arch: x86_64
- label: macos-15-intel
os: darwin
arch: x86_64
- label: macos-15
os: darwin
arch: arm64
steps:
- uses: actions/checkout@v7
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'liberica'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build ac/acx
run: ./gradlew nativeCompile
env:
# Needed for Windows; not an issue for other OSes
GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }}
- name: Run CLTH tests
if: ${{ matrix.os != 'windows' }}
shell: bash
run: ./scripts/run-clth-tests.sh
- name: Upload binary
uses: actions/upload-artifact@v7
with:
name: ac-${{ matrix.os }}-${{ matrix.arch }}
path: app/cli-ac/build/native/nativeCompile/ac-*
- name: Upload binary
uses: actions/upload-artifact@v7
with:
name: acx-${{ matrix.os }}-${{ matrix.arch }}
path: app/cli-acx/build/native/nativeCompile/acx-*