Skip to content

Commit

Permalink
Merge branch 'projectlombok:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
dembanakh authored Mar 26, 2023
2 parents 2388c3a + b80ff39 commit 4bb7f1b
Show file tree
Hide file tree
Showing 108 changed files with 1,293 additions and 519 deletions.
153 changes: 153 additions & 0 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Tests

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
ivyCache
lib
key: ${{ runner.os }}-${{ hashFiles('**/ivy.xml') }}
restore-keys: |
${{ runner.os }}-
- name: Build with Ant
run: ant -noinput dist

- uses: actions/upload-artifact@v3
with:
name: lombok.jar
path: dist/lombok.jar


test-javac:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
jdk: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]
goal: [javacCurrent]
include:
- jdk: 11
goal: javac6
- jdk: 11
goal: javac8
fail-fast: false

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

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

- name: Install Ant
run: |
wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.13-bin.zip
unzip apache-ant-1.10.13-bin.zip -d "${HOME}"
echo "ANT_HOME=${HOME}/apache-ant-1.10.13" >> $GITHUB_ENV
echo "${HOME}/apache-ant-1.10.13/bin" >> $GITHUB_PATH
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
ivyCache
lib
key: ${{ runner.os }}-${{ hashFiles('**/ivy.xml') }}
restore-keys: |
${{ runner.os }}-
- name: Run tests
run: ant -noinput test.${{ matrix.goal }}

test-eclipse:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
version:
- eclipse-oxygen
- eclipse-202006
- eclipse-202006-jdk8
- eclipse-202212
- eclipse-oxygen-full
- eclipse-2022-03-full
- ecj11
- ecj14
- ecj16
- ecj19
fail-fast: false

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

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
ivyCache
lib
key: ${{ runner.os }}-${{ hashFiles('**/ivy.xml') }}
restore-keys: |
${{ runner.os }}-
- name: Build with Ant
run: xvfb-run ant -noinput dist test.${{ matrix.version }}

docker-integration-test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
jdk: [8, 9, 10, 11, 12, 13, 16]
tool:
- {name: "maven", cmd: "mvn compile"}
- {name: "gradle", cmd: "gradle assemble"}
- {name: "ant", cmd: "ant dist"}
- {name: "bazel", cmd: "bazel build //:ProjectRunner"}
fail-fast: false
env:
IMAGE_NAME: lombok-${{ matrix.tool.name }}-jdk${{ matrix.jdk }}

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

- uses: actions/download-artifact@v3
with:
name: lombok.jar

- name: Build container
working-directory: ./docker
run: docker build --build-arg jdk=${{ matrix.jdk }} -t $IMAGE_NAME -f ${{ matrix.tool.name }}/Dockerfile .

- 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 }}"
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/google.properties
/debug
/*.launch
/ssh.configuration
/findbugsReport.html
/lib
/.settings
Expand All @@ -24,4 +23,5 @@
/website/lombokSupporters
/pom.xml
/jvm.locations
/testenv
/testenv
/gpg.keyring
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Caleb Brinkman <[email protected]>
Christian Nüssgens <[email protected]>
Christian Schlichtherle <[email protected]>
Christian Sterzl <[email protected]>
Christoph Dreis <[email protected]>
DaveLaw <[email protected]>
Dave Brosius <[email protected]>
Dawid Rusin <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion buildScripts/compile.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020-2022 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
35 changes: 13 additions & 22 deletions buildScripts/eclipse-p2.ant.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (C) 2020 The Project Lombok Authors.
Copyright (C) 2020-2023 The Project Lombok Authors.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -35,7 +35,7 @@ This buildfile is part of projectlombok.org. It is responsible for building the
<java classname="Epoch" classpath="build/p2-support" fork="false" outputproperty="dt.epochMillis" />
</target>

<target name="eclipsep2.build" depends="version, -eclipsep2.get-epoch">
<target name="eclipsep2.build" depends="version, dist, -eclipsep2.get-epoch">
<tstamp><format property="dt.year" pattern="yyyy" /></tstamp>
<mkdir dir="build/p2" />
<mkdir dir="build/p2/features" />
Expand Down Expand Up @@ -109,25 +109,16 @@ This buildfile is part of projectlombok.org. It is responsible for building the
<delete file="build/p2/content.xml" />
</target>

<target name="eclipsep2.pack" depends="eclipsep2.build">
<tar destfile="dist/eclipse-p2.tar.bz2" compression="bzip2">
<tarfileset dir="build/p2" />
</tar>
</target>

<target name="eclipsep2.publish" depends="setup.ssh, eclipsep2.pack">
<ivy:scpUpload
from="dist/eclipse-p2.tar.bz2"
to="/data/lombok/staging"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
<ivy:sshExec
cmd="/data/lombok/stagingCmd/deployP2"
server="projectlombok.org"
username="${ssh.username}"
keyfile="${ssh.keyfile}"
knownHosts="ssh.knownHosts" />
<target name="eclipsep2.publish" depends="eclipsep2.build, compile.support">
<java classname="lombok.publish.PublishToBucket" failonerror="true">
<classpath>
<path refid="cp.buildtools" />
<pathelement location="build/support" />
</classpath>
<arg value="${gpg.keyrings}/s3_creds.txt" />
<arg value="build/p2" />
<arg value="p2" />
<arg value="true" />
</java>
</target>
</project>
21 changes: 9 additions & 12 deletions buildScripts/info.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,16 @@ Turns the changelog at doc/changelog.markdown into
build/website/changelog.html.

&gt; ant website.build
&gt; ant website.pack
&gt; ant website.release-build
&gt; ant website.publish
&gt; ant website.release-publish

'build' Builds the website (by for example applying freemarker templates) into
build/website.
'pack' bzips this up, ready to ship to the server.
'publish' sends this to the server and runs a script to deploy.
'build' Builds the website into build/website, _without_ reflecting a new release; this is
just in case you e.g. edited some documentation.
'publish' deploys this to the server.
'release-build' builds the website _with_ reflecting a new release, updating all-versions,
the download page, updating the javadoc, etc.
'release-ppublic' deploys this to the server.

&gt; ant website.open

Expand All @@ -269,14 +272,9 @@ Makes a changelog variant that lists only the newest changes; it is included
in the distribution for convenience.

&gt; ant javadoc.build
&gt; ant javadoc.pack
&gt; ant javadoc.publish

'build' Builds the javadoc into build/api.
'pack' bzips this up, ready to ship to the server.
'publish' sends this to the server and runs a script to deploy.

&gt; ant edge.pack
&gt; ant edge.publish

'pack' creates a bzip with all relevant files needed to deploy a new edge
Expand All @@ -285,8 +283,7 @@ maven repo update so that the edge release can be fetched as a maven dep,
and an update to the download-edge page listing the latest changes included
in the edge release.

'publish' sends this to the server, runs a script server-side to deploy the
content, and updates a git tag on success.</echo>
'publish' sends the edge release to projectlombok.org directly.</echo>
</target>

<target name="help.p2">
Expand Down
10 changes: 1 addition & 9 deletions buildScripts/ivy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<!-- dependencies for the build itself, such as tools to create the website or deploy to servers. -->
<conf name="buildtools" />

<!-- dependencies needed only for the 'manage lombok supporters' part of the build -->
<conf name="supporters" />

<!-- test: base dependencies required to run the tests. Does not include javac or ecj. -->
<conf name="test" />

Expand Down Expand Up @@ -65,12 +62,7 @@
<dependency org="de.java2html" name="java2html" rev="5.0" conf="buildtools->default" />
<dependency org="org.freemarker" name="freemarker" rev="2.3.28" conf="buildtools->default" />
<dependency org="com.sparkjava" name="spark-core" rev="2.9.2" conf="buildtools->default" />

<dependency org="org.eclipse.jgit" name="org.eclipse.jgit.ant" rev="5.2.0.201812061821-r" conf="supporters->default" />
<dependency org="org.eclipse.jgit" name="org.eclipse.jgit" rev="5.2.0.201812061821-r" conf="supporters->default" />
<dependency org="com.jcraft" name="jsch" rev="0.1.54" conf="supporters->default" />
<dependency org="com.rimerosolutions.ant" name="ant-git-tasks" rev="1.3.2" conf="supporters->default" />
<dependency org="org.slf4j" name="slf4j-simple" rev="1.8.0-beta2" conf="supporters->default" />
<dependency org="software.amazon.awssdk" name="s3" rev="2.19.29" conf="buildtools->default" />

<!-- javacs -->
<dependency org="net.java.openjdk.custom" name="javac6" rev="1.6.0.18" conf="javac6->runtime" />
Expand Down
2 changes: 1 addition & 1 deletion buildScripts/mapstructBinding.ant.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ exists as a separate dependency solely because it is itself dependent on both lo
<target name="mapstructBinding.pack" depends="dist,-mapstructBinding.jar,-mapstructBinding.doc,-mapstructBinding.src">
</target>

<target name="mapstructBinding.publish" depends="mapstructBinding.pack, setup.ssh">
<target name="mapstructBinding.publish" depends="mapstructBinding.pack">
<tar destfile="dist/mavenPublish-mapstructBinding.tar.bz2" compression="bzip2">
<tarfileset dir="dist">
<include name="lombok-mapstruct-binding-${mapstruct-binding.version}.jar" />
Expand Down
Loading

0 comments on commit 4bb7f1b

Please sign in to comment.