-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preprocess the matrix to avoid running M1 jobs on forks
- Loading branch information
1 parent
004eb29
commit 88bba45
Showing
3 changed files
with
65 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
BASEDIR=$(dirname "$0") | ||
|
||
# Filter out mac os from a matrix of build configurations. | ||
# The reason we do this is that running mac on a fork won't work; the fork won't have a self-hosted runner | ||
|
||
# See https://stackoverflow.com/questions/65384420/how-to-make-a-github-action-matrix-element-conditional | ||
|
||
repoName=${GITHUB_REPOSITORY} | ||
|
||
if [[ $repoName == "quarkusio/quarkus" ]] | ||
then | ||
matrix=$(cat $BASEDIR/matrix-jvm-tests.json) | ||
else | ||
# Use jq to read in a json file that represents the matrix configuration. | ||
matrix=$(jq 'map(. | select(.["os-name"]!="macos-arm64-latest"))' $BASEDIR/matrix-jvm-tests.json) | ||
fi | ||
|
||
echo \{java: ${matrix}\} |
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,36 @@ | ||
[ { | ||
"name": "11", | ||
"java-version": 11, | ||
"maven_args": "$JVM_TEST_MAVEN_ARGS", | ||
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g", | ||
"os-name": "ubuntu-latest" | ||
} | ||
, { | ||
"name": "17", | ||
"java-version": 17, | ||
"maven_args": "$JVM_TEST_MAVEN_ARGS", | ||
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g", | ||
"os-name": "ubuntu-latest" | ||
} | ||
, { | ||
"name": "18", | ||
"java-version": 18, | ||
"maven_args": "$JVM_TEST_MAVEN_ARGS", | ||
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g", | ||
"os-name": "ubuntu-latest" | ||
} | ||
, { | ||
"name": "11 Windows", | ||
"java-version": 11, | ||
"maven_args": "-DskipDocs -Dformat.skip", | ||
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g -Xlog:gc*=debug:file=windows-java-11.txt", | ||
"os-name": "windows-latest" | ||
} | ||
, { | ||
"name": "17 MacOS M1", | ||
"java-version": 17, | ||
"maven_args": "-DskipDocs -Dformat.skip", | ||
"maven_opts": "-Xmx2g -XX:MaxMetaspaceSize=1g", | ||
"architecture": "aarch64", | ||
"os-name": "macos-arm64-latest" | ||
}] |
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