Add compile test step to Github Actions

This commit is contained in:
Rawi01 committed 2024-11-24 21:46:27 +01:00
1 parent 4294ebd301
commit 36f5fa6cea
3 files changed
+50

No files matched your search

+29
View File
@@ -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
View File
@@ -0,0 +1 @@
/out
+20
View File
@@ -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/