diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml
index 893ec71b69..5247b6a821 100644
--- a/.azure-pipelines/azure-pipelines.yml
+++ b/.azure-pipelines/azure-pipelines.yml
@@ -87,21 +87,9 @@ jobs:
else
export JAVA_HOME=$JAVA_HOME_17_X64
fi
- if [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "5" ]]; then
- .maven/bin/mvn -V -B -e --no-transfer-progress -f org.jacoco.build \
- verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION \
- deploy:deploy -DdeployAtEnd \
- --toolchains=toolchains.xml --settings=.azure-pipelines/maven-settings.xml
- elif [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "11" ]]; then
- .maven/bin/mvn -V -B -e --no-transfer-progress -f org.jacoco.build \
- verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION \
- sonar:sonar \
- --toolchains=toolchains.xml --settings=.azure-pipelines/maven-settings.xml
- else
- .maven/bin/mvn -V -B -e --no-transfer-progress \
- verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION -Decj=${ECJ:-} \
- --toolchains=toolchains.xml
- fi
+ .maven/bin/mvn -V -B -e --no-transfer-progress \
+ verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION -Decj=${ECJ:-} \
+ --toolchains=toolchains.xml
displayName: Build
env:
SONARQUBE_TOKEN: $(SONARQUBE_TOKEN)
diff --git a/.azure-pipelines/maven-settings.xml b/.azure-pipelines/maven-settings.xml
deleted file mode 100644
index dbce384964..0000000000
--- a/.azure-pipelines/maven-settings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- sonatype-nexus-snapshots
- ${env.SONATYPE_USERNAME}
- ${env.SONATYPE_PASSWORD}
-
-
-
-
- SonarCloud
-
- https://sonarcloud.io/
- default
- ${env.SONARQUBE_TOKEN}
-
-
-
-
- SonarCloud
-
-
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a6a34ecb38..6ff436bf4d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -46,6 +46,72 @@ jobs:
mvn -V -B -e --no-transfer-progress \
verify -Djdk.version=${{ matrix.jdk }} -Dbytecode.version=${{ matrix.jdk }} \
--toolchains=toolchains.xml
+ JDK5:
+ name: JDK 5
+ runs-on: ubuntu-20.04
+ # TODO repository and ref
+ environment: ${{ (github.repository == 'jacoco/jacoco' && github.ref == 'refs/heads/master') && 'snapshot' || null }}
+ steps:
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
+ - uses: Godin/github-action-setup-java@main
+ with:
+ version: 5
+ - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
+ with:
+ distribution: 'zulu'
+ java-version: |
+ 17
+ server-id: sonatype-nexus-snapshots
+ server-username: SONATYPE_USERNAME
+ server-password: SONATYPE_PASSWORD
+ - name: 'Generate toolchains.xml'
+ env:
+ JDK_VERSION: 5
+ JDK_HOME_VARIABLE_NAME: JAVA_HOME_5_X64
+ run: |
+ echo "
+
+
+ jdk
+
+ $JDK_VERSION
+ $JDK_VERSION
+
+
+ ${!JDK_HOME_VARIABLE_NAME}
+
+
+
+ " > toolchains.xml
+ - name: 'Build'
+ env:
+ SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
+ SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
+ SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
+ run: |
+ if [[ "$GITHUB_REPOSITORY" == "jacoco/jacoco" && "$GITHUB_REF" == "refs/heads/master" ]]; then
+ mvn -V -B -e --no-transfer-progress \
+ verify -Djdk.version=5 -Dbytecode.version=5 \
+ -f org.jacoco.build \
+ deploy:deploy -DdeployAtEnd \
+ sonar:sonar -Dsonar.organization=default -Dsonar.host.url=https://sonarcloud.io \
+ --toolchains=toolchains.xml
+ else
+ mvn -V -B -e --no-transfer-progress \
+ verify -Djdk.version=5 -Dbytecode.version=5 \
+ --toolchains=toolchains.xml
+ fi
+ - name: 'Trigger deployments of sites'
+ if: ${{ (github.repository == 'jacoco/jacoco' && github.ref == 'refs/heads/master') }}
+ uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
+ with:
+ github-token: ${{ secrets.GH_TOKEN }}
+ script: |
+ github.rest.repos.createDispatchEvent({
+ owner: 'jacoco',
+ repo: 'www.eclemma.org',
+ event_type: "JaCoCo build",
+ })
Windows:
runs-on: windows-2022
steps: