# # Copyright (c) 2017 Angelo Zerr and other contributors as # indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # name: GitHub Actions on: [push, pull_request] env: GRAALVM_VERSION: '21.3.0.java11' jobs: linux-jdk11: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v1 - name: Set VERSION env var run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - name: setup-graalvm-ce uses: DeLaGuardo/setup-graalvm@5.0 with: graalvm-version: ${{ env.GRAALVM_VERSION }} - name: gu install native-image run: gu install native-image - name: Skip tests when releasing from a tag if: startsWith(github.ref, 'refs/tags') shell: bash run: echo "SKIP_TESTS_OPT=-DskipTests" >> $GITHUB_ENV - name: mvn clean verify run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e $SKIP_TESTS_OPT - name: Upload daemon test logs if: ${{ success() || failure() }} uses: actions/upload-artifact@v2 with: name: daemon-test-logs-linux path: integration-tests/target/mvnd-tests/**/daemon*.log - name: Upload mvnd.zip uses: actions/upload-artifact@v2 with: name: mvnd-linux-amd64.zip path: dist/target/mvnd-*.zip windows-jdk11: runs-on: windows-2019 steps: - uses: actions/checkout@v1 - name: Set VERSION env var shell: bash run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - name: setup-graalvm-ce uses: DeLaGuardo/setup-graalvm@5.0 with: graalvm-version: ${{ env.GRAALVM_VERSION }} - name: gu install native-image shell: cmd run: gu install native-image - name: Skip tests when releasing from a tag if: startsWith(github.ref, 'refs/tags') shell: bash run: echo "SKIP_TESTS_OPT=-DskipTests" >> $GITHUB_ENV - name: mvn clean verify shell: cmd run: | call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e %SKIP_TESTS_OPT% - name: Upload daemon test logs if: ${{ success() || failure() }} uses: actions/upload-artifact@v2 with: name: daemon-test-logs-windows path: integration-tests/target/mvnd-tests/**/daemon*.log - name: Upload mvnd.zip uses: actions/upload-artifact@v2 with: name: mvnd-windows-amd64.zip path: dist/target/mvnd-*.zip darwin-jdk11: runs-on: macos-10.15 steps: - uses: actions/checkout@v1 - name: Set VERSION env var run: echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV - name: setup-graalvm-ce uses: DeLaGuardo/setup-graalvm@5.0 with: graalvm-version: ${{ env.GRAALVM_VERSION }} - name: gu install native-image run: gu install native-image - name: Skip tests when releasing from a tag if: startsWith(github.ref, 'refs/tags') shell: bash run: echo "SKIP_TESTS_OPT=-DskipTests" >> $GITHUB_ENV - name: mvn clean verify run: ./mvnw clean verify -Pnative -Dmrm=false -B -ntp -e $SKIP_TESTS_OPT - name: Upload daemon test logs if: ${{ success() || failure() }} uses: actions/upload-artifact@v2 with: name: daemon-test-logs-darwin path: integration-tests/target/mvnd-tests/**/daemon*.log - name: Upload mvnd.zip uses: actions/upload-artifact@v2 with: name: mvnd-darwin-amd64.zip path: dist/target/mvnd-*.zip