From dbc599785918d1b3397beded05c5471b458b14f7 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Mon, 2 Dec 2024 21:14:34 -0800 Subject: [PATCH] Update CI, maven wrapper --- .github/workflows/main.yml | 18 ++++++++++-------- .mvn/wrapper/maven-wrapper.properties | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e681a7f8f..2b92d090a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,18 +21,20 @@ permissions: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: 'ubuntu-22.04' strategy: fail-fast: false matrix: java_version: ['8', '11', '17', '21'] - os: ['ubuntu-20.04'] + include: + - java_version: '17' + release_build: 'R' env: JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 with: distribution: 'temurin' java-version: ${{ matrix.java_version }} @@ -49,18 +51,18 @@ jobs: id: projectVersion run: echo "version=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.3.0:evaluate -DforceStdout -Dexpression=project.version -q)" >> $GITHUB_OUTPUT - name: Deploy snapshot - if: github.event_name != 'pull_request' && matrix.java_version == '8' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT') + if: ${{ matrix.release_build && github.event_name != 'pull_request' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT') }} env: CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }} CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }} # MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} run: ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy - name: Generate code coverage - if: github.event_name != 'pull_request' && matrix.java_version == '8' + if: ${{ matrix.release_build && github.event_name != 'pull_request' }} run: ./mvnw -B -q -ff -ntp test - name: Publish code coverage - if: github.event_name != 'pull_request' && matrix.java_version == '8' - uses: codecov/codecov-action@v5 + if: ${{ matrix.release_build && github.event_name != 'pull_request' }} + uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./target/site/jacoco/jacoco.xml diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 5366408e6..8f2e64519 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.3/apache-maven-3.9.3-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar