From 8def6d272d35a4916fc48f83dd5af4bf41045362 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 12:59:02 -0500 Subject: [PATCH 1/5] Add license-check job to build workflow Added a license-check job to ensure all Java files contain the GNU General Public License header. --- .github/workflows/build.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d41512..fb354a9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,9 +45,27 @@ jobs: archive: false if-no-files-found: error + 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: bt and st on ${{ matrix.os }}-${{ matrix.arch }} - needs: [build-java] + needs: [build-java, license-check] runs-on: ${{ matrix.label }} strategy: matrix: From 1f37899dc2afcd42ad8a1fc75476e9fa5afc33d9 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:00:36 -0500 Subject: [PATCH 2/5] Add comments for license header check Add comments explaining the license header check in the build workflow. --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb354a9..28eb437 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,8 @@ jobs: 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: From 47dd83aac31b39eeff51fb28664b62c6960e1637 Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:03:25 -0500 Subject: [PATCH 3/5] Add UPX compression step to build workflow --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28eb437..8576dce 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,6 +102,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 + with: + files: | + tools/bt/build/native/nativeCompile/bt* + tools/st/build/native/nativeCompile/st* - name: Run CLTH tests if: ${{ matrix.os != 'windows' }} shell: bash From fa1d6bffc936c308666efc7fa802502d7142979d Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:05:03 -0500 Subject: [PATCH 4/5] 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 3f7386d..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 bastools 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" | 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 \ No newline at end of file From c70af6de6d15844d26ef865817b30f2163798a5a Mon Sep 17 00:00:00 2001 From: A2 Geek Date: Sat, 25 Jul 2026 13:17:23 -0500 Subject: [PATCH 5/5] Add conditional check for UPX action on OS --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8576dce..c11cd08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,6 +104,7 @@ jobs: 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: | tools/bt/build/native/nativeCompile/bt*