Skip to content

Commit

Permalink
Add compile test step to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawi01 committed Nov 24, 2024
1 parent 4294ebd commit 36f5fa6
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,32 @@ jobs:

- name: Compile in container
run: docker run --entrypoint="" -v $(pwd)/lombok.jar:/workspace/lombok.jar $IMAGE_NAME /bin/bash -c "cd classpath; ${{ matrix.tool.cmd }}"

manual-tests:
runs-on: ubuntu-24.04
needs: build
strategy:
matrix:
jdk: [8, 11, 17, 21, 23]
dir: [compileTests]
fail-fast: false

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'

- uses: actions/download-artifact@v4
with:
name: lombok.jar
path: dist

- name: Run tests
working-directory: ./test/manual/${{ matrix.dir }}/
run: ./runTests.sh

1 change: 1 addition & 0 deletions test/manual/compileTests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/out
20 changes: 20 additions & 0 deletions test/manual/compileTests/runTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
set -e
echo 'This will compile a selection of files in test/transform/resource/before. If the compilation works without error, lombok is working as designed.'

mkdir -p out/

# list of files to iterate over
FILES="UtilityClassInner.java"
BASE_PATH="../../../test/transform/resource/before"
LOMBOK_JAR="../../../dist/lombok.jar"

# compile all files in list
for f in $FILES
do

echo "Compiling $f"
javac -processorpath $LOMBOK_JAR -cp $LOMBOK_JAR -d out/ $BASE_PATH/$f
done

rm -rf out/

0 comments on commit 36f5fa6

Please sign in to comment.