mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-09 01:30:57 +00:00
Try to remove the custom setup for graalvm native-image on windows
This commit is contained in:
36
.github/workflows/test-jdk11.yaml
vendored
36
.github/workflows/test-jdk11.yaml
vendored
@@ -65,6 +65,12 @@ jobs:
|
||||
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:
|
||||
@@ -74,36 +80,6 @@ jobs:
|
||||
shell: cmd
|
||||
run: gu install native-image
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.JAVA_HOME }}\bin\native-image.exe
|
||||
key: ${{ runner.os }}-native-image-${{ env.GRAALVM_VERSION }}
|
||||
|
||||
- name: Check if native-image.exe exists
|
||||
id: native_image_exe_exists
|
||||
uses: andstor/file-existence-action@v1
|
||||
with:
|
||||
files: ${{ env.JAVA_HOME }}\bin\native-image.exe
|
||||
|
||||
- name: Compile native-image.cmd to native-image.exe
|
||||
if: ${{ steps.native_image_exe_exists.outputs.files_exists == 'false' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
"%JAVA_HOME%\bin\native-image.cmd" -jar "%JAVA_HOME%\lib\graalvm\svm-driver.jar" native-image
|
||||
|
||||
- name: move native-image.exe %JAVA_HOME%\bin\
|
||||
if: ${{ steps.native_image_exe_exists.outputs.files_exists == 'false' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
move native-image.exe "%JAVA_HOME%\bin\"
|
||||
|
||||
- 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: Skip tests when releasing from a tag
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
shell: bash
|
||||
|
36
.github/workflows/verify.yaml
vendored
36
.github/workflows/verify.yaml
vendored
@@ -65,6 +65,12 @@ jobs:
|
||||
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:
|
||||
@@ -74,36 +80,6 @@ jobs:
|
||||
shell: cmd
|
||||
run: gu install native-image
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: ${{ env.JAVA_HOME }}\bin\native-image.exe
|
||||
key: ${{ runner.os }}-native-image-${{ env.GRAALVM_VERSION }}
|
||||
|
||||
- name: Check if native-image.exe exists
|
||||
id: native_image_exe_exists
|
||||
uses: andstor/file-existence-action@v1
|
||||
with:
|
||||
files: ${{ env.JAVA_HOME }}\bin\native-image.exe
|
||||
|
||||
- name: Compile native-image.cmd to native-image.exe
|
||||
if: ${{ steps.native_image_exe_exists.outputs.files_exists == 'false' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
||||
"%JAVA_HOME%\bin\native-image.cmd" -jar "%JAVA_HOME%\lib\graalvm\svm-driver.jar" native-image
|
||||
|
||||
- name: move native-image.exe %JAVA_HOME%\bin\
|
||||
if: ${{ steps.native_image_exe_exists.outputs.files_exists == 'false' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
move native-image.exe "%JAVA_HOME%\bin\"
|
||||
|
||||
- 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: Skip tests when releasing from a tag
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
shell: bash
|
||||
|
Reference in New Issue
Block a user