forked from Karm/mandrel-integration-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request Karm#88 from Karm/jdk-min-max-version-annotation
Adds minJDK and maxJDK to IfMandrelVersion annotation
- Loading branch information
Showing
10 changed files
with
364 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
name: Testing testsuite | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- 'LICENSE' | ||
- '**.md' | ||
pull_request: | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
paths-ignore: | ||
- 'LICENSE' | ||
- '**.md' | ||
|
||
env: | ||
LANG: en_US.UTF-8 | ||
|
||
jobs: | ||
local-run: | ||
name: ${{ matrix.os }} - ${{ matrix.java-version }} - ${{ matrix.mandrel-version }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mandrel-version: [ '21.3.1.1-Final', '22.0.0.2-Final' ] | ||
java-version: [ '11', '17' ] | ||
os: [ ubuntu-20.04, windows-2019 ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
path: ts | ||
- name: Cache local Maven repository | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ matrix.os }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ matrix.os }}- | ||
- uses: actions/cache@v2 | ||
name: Mandrel installation cached | ||
id: cache_mandrel | ||
with: | ||
path: | | ||
${{ github.workspace }}/${{ matrix.java-version }}-${{ matrix.mandrel-version }} | ||
key: ${{ matrix.os }}-${{ matrix.java-version }}-${{ matrix.mandrel-version }} | ||
- name: Install Mandrel Windows | ||
if: startsWith(matrix.os, 'windows') && steps.cache_mandrel.outputs.cache-hit != 'true' | ||
run: | | ||
$url= "https://github.com/graalvm/mandrel/releases/download/mandrel-${{ matrix.mandrel-version }}/mandrel-java${{ matrix.java-version }}-windows-amd64-${{ matrix.mandrel-version }}.zip" | ||
$wc = New-Object System.Net.WebClient | ||
$file = $(Split-Path -Path $url -Leaf) | ||
Write-Host "Downloading $url to $Env:temp\$file" | ||
$wc.DownloadFile($url, "$Env:temp\$file") | ||
Expand-Archive "$Env:temp\$file" -DestinationPath "${{ github.workspace }}" | ||
$path=(Get-ChildItem mandrel-*).name | ||
move $path ${{ github.workspace }}/${{ matrix.java-version }}-${{ matrix.mandrel-version }} | ||
shell: powershell | ||
- name: Install Mandrel Linux | ||
if: startsWith(matrix.os, 'ubuntu') && steps.cache_mandrel.outputs.cache-hit != 'true' | ||
run: | | ||
wget "https://github.com/graalvm/mandrel/releases/download/mandrel-${{ matrix.mandrel-version }}/mandrel-java${{ matrix.java-version }}-linux-amd64-${{ matrix.mandrel-version }}.tar.gz" | ||
tar -xf mandrel-java${{ matrix.java-version }}-linux-amd64-${{ matrix.mandrel-version }}.tar.gz | ||
rm *.tar.gz | ||
mv $( echo mandrel-java${{ matrix.java-version }}*-*/ ) ${{ github.workspace }}/${{ matrix.java-version }}-${{ matrix.mandrel-version }} | ||
shell: bash | ||
- name: Windows test | ||
if: startsWith(matrix.os, 'windows') | ||
timeout-minutes: 55 | ||
env: | ||
MAVEN_OPTS: -Xmx1g | ||
run: | | ||
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\;%PATH% | ||
call vcvars64 | ||
IF NOT %ERRORLEVEL% == 0 ( exit 1 ) | ||
set "GRAALVM_HOME=${{ github.workspace }}\${{ matrix.java-version }}-${{ matrix.mandrel-version }}" | ||
set "JAVA_HOME=%GRAALVM_HOME%" | ||
set "PATH=%JAVA_HOME%\bin;%PATH%" | ||
if not exist "%GRAALVM_HOME%\bin\native-image.cmd" ( | ||
echo "Cannot find native-image tool. Quitting..." | ||
exit 1 | ||
) else ( | ||
echo "native-image.cmd is present, good." | ||
cmd /C native-image --version | ||
) | ||
pushd ts | ||
mkdir ~/.m2/ | ||
copy .github/mvn-settings.xml ~/.m2/settings.xml | ||
mvn clean verify -Ptestsuite -DexcludeTags=all -DincludeTags=testing-testsuite | ||
shell: cmd | ||
- name: Linux test | ||
if: startsWith(matrix.os, 'ubuntu') | ||
timeout-minutes: 55 | ||
env: | ||
MAVEN_OPTS: -Xmx1g | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y gdb | ||
export JAVA_HOME=${{ github.workspace }}/${{ matrix.java-version }}-${{ matrix.mandrel-version }} | ||
export GRAALVM_HOME="${JAVA_HOME}" | ||
export PATH="${JAVA_HOME}/bin:$PATH" | ||
if [[ ! -e "${JAVA_HOME}/bin/native-image" ]]; then | ||
echo "Cannot find native-image tool. Quitting..." | ||
exit 1 | ||
fi | ||
native-image --version | ||
pushd ts | ||
mkdir -p ~/.m2/ | ||
cp .github/mvn-settings.xml ~/.m2/settings.xml | ||
mvn clean verify -Ptestsuite -DexcludeTags=all -DincludeTags=testing-testsuite | ||
shell: bash | ||
- name: Prepare failure archive (if maven failed) | ||
if: failure() | ||
run: tar czvf test-reports-mandrel-it.tgz ${{ github.workspace }}/ts/testsuite/target/archived-logs | ||
- name: Upload failure Archive (if maven failed) | ||
uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: reports-${{ matrix.mandrel-version }}-${{ matrix.java-version }}-${{ matrix.os }} | ||
path: 'test-reports-mandrel-it.tgz' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.