From f25eace2f8c7eda96f0fdb999bc9869e9cac34ba Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:34:05 -0500 Subject: [PATCH 1/8] Add native build job dependent on Java build Added a new job for building native binaries that depends on the Java build job. --- .github/workflows/nativeCompile.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nativeCompile.yml b/.github/workflows/nativeCompile.yml index 61ee44a..6eb80f0 100644 --- a/.github/workflows/nativeCompile.yml +++ b/.github/workflows/nativeCompile.yml @@ -9,8 +9,29 @@ on: branches: [ "main" ] jobs: - build: + build-java: + runs-on: ubuntu-latest + steps: + - 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 + run: ./gradlew build + - name: Upload artifacts + uses: actions/upload-artifact@v7 + with: + name: build-artifacts + path: cli/build/libs/acdasm-*.jar + if-no-files-found: error + + build-native: name: acdasm on ${{ matrix.os }}-${{ matrix.arch }} + needs: [build-java] runs-on: ${{ matrix.label }} strategy: matrix: From 1fe87c9bd37e7200fec86edb19a1f08ffc8d84fa Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:34:38 -0500 Subject: [PATCH 2/8] Delete .github/workflows/gradle.yml --- .github/workflows/gradle.yml | 42 ------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml deleted file mode 100644 index a038b80..0000000 --- a/.github/workflows/gradle.yml +++ /dev/null @@ -1,42 +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 acdasm CLI and API - -on: - push: - branches: [ "main" ] - tags: - - '*' - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - 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 - run: ./gradlew build - - name: Upload artifacts - uses: actions/upload-artifact@v7 - with: - name: build-artifacts - path: cli/build/libs/acdasm-*.jar - if-no-files-found: error From 851cacfe0db2d4550ceeefb972fc554af50aabf7 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:35:38 -0500 Subject: [PATCH 3/8] Update and rename nativeCompile.yml to build.yml --- .../{nativeCompile.yml => build.yml} | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) rename .github/workflows/{nativeCompile.yml => build.yml} (74%) diff --git a/.github/workflows/nativeCompile.yml b/.github/workflows/build.yml similarity index 74% rename from .github/workflows/nativeCompile.yml rename to .github/workflows/build.yml index 6eb80f0..8184933 100644 --- a/.github/workflows/nativeCompile.yml +++ b/.github/workflows/build.yml @@ -29,9 +29,29 @@ jobs: path: cli/build/libs/acdasm-*.jar 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" | 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: acdasm on ${{ matrix.os }}-${{ matrix.arch }} - needs: [build-java] + needs: [build-java, license-check] runs-on: ${{ matrix.label }} strategy: matrix: From 1b2b8ac28160ffa1e30696d70dca3f31f3f26e9b Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:35:47 -0500 Subject: [PATCH 4/8] Delete .github/workflows/license.yml --- .github/workflows/license.yml | 36 ----------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/license.yml diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml deleted file mode 100644 index 926348e..0000000 --- a/.github/workflows/license.yml +++ /dev/null @@ -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 'acdasm' files have 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" | 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 From fd3eb3945d44d4b79cc363aa797346f418389906 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:36:06 -0500 Subject: [PATCH 5/8] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8184933..25f58f8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: GraalVM Native Image builds +name: Build AppleCommander on: push: From 32cb523b8ac6d3f1761ba30a03fb6ebcd88937c8 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:37:06 -0500 Subject: [PATCH 6/8] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25f58f8..3a08385 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build AppleCommander +name: Build AppleCommander disassembler on: push: From 3f59f163132f93804cf67cb07b90b6bc00ad1268 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:38:33 -0500 Subject: [PATCH 7/8] Add UPX step for binary compression in build workflow Added a step to run UPX for binary compression on Windows and Linux. --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a08385..eab89a3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,14 +75,12 @@ jobs: 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' - # 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 above). - name: Build 'acdasm' @@ -90,7 +88,12 @@ jobs: 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: | + cli/build/native/nativeCompile/acdasm* - name: Upload binary uses: actions/upload-artifact@v7 with: From 7690abb440ce9b7d375fad89f7f300a24390947b Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:48:34 -0500 Subject: [PATCH 8/8] Disable archiving for uploaded artifacts --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eab89a3..5bc5546 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ jobs: with: name: build-artifacts path: cli/build/libs/acdasm-*.jar + archive: false if-no-files-found: error # This is a crude license header check. The ones I tested were susceptible to whitespace differences @@ -99,3 +100,4 @@ jobs: with: name: acdasm-${{ matrix.os }}-${{ matrix.arch }} path: cli/build/native/nativeCompile/acdasm* + archive: false