Skip to content

Commit

Permalink
Merge pull request #27156 from holly-cummins/holly-m1-action-runner
Browse files Browse the repository at this point in the history
Add MacOS M1 runs to incremental builds
  • Loading branch information
gsmet authored Sep 20, 2022
2 parents 8c87bc8 + fe3b84d commit dfb830c
Show file tree
Hide file tree
Showing 9 changed files with 228 additions and 33 deletions.
20 changes: 20 additions & 0 deletions .github/filter-jvm-tests-json.sh
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}\}
36 changes: 36 additions & 0 deletions .github/matrix-jvm-tests.json
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"
}]
46 changes: 13 additions & 33 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ jobs:
GIB_IMPACTED_MODULES: ${{ needs.build-jdk11.outputs.gib_impacted }}
outputs:
native_matrix: ${{ steps.calc-native-matrix.outputs.matrix }}
jvm_matrix: ${{ steps.calc-jvm-matrix.outputs.matrix }}
run_jvm: ${{ steps.calc-run-flags.outputs.run_jvm }}
run_devtools: ${{ steps.calc-run-flags.outputs.run_devtools }}
run_gradle: ${{ steps.calc-run-flags.outputs.run_gradle }}
Expand All @@ -236,6 +237,12 @@ jobs:
json=$(.github/filter-native-tests-json.sh "${GIB_IMPACTED_MODULES}" | tr -d '\n')
echo "${json}"
echo "::set-output name=matrix::${json}"
- name: Calculate matrix from matrix-jvm-tests.json
id: calc-jvm-matrix
run: |
json=$(.github/filter-jvm-tests-json.sh)
echo "${json}"
echo "::set-output name=matrix::${json}"
- name: Calculate run flags
id: calc-run-flags
run: |
Expand Down Expand Up @@ -267,40 +274,12 @@ jobs:
MAVEN_OPTS: ${{ matrix.java.maven_opts }}
strategy:
fail-fast: false
matrix:
java:
- {
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"
}
matrix: ${{ fromJson(needs.calculate-test-jobs.outputs.jvm_matrix) }}


steps:
- name: Stop mysql
if: "!startsWith(matrix.java.os-name, 'windows')"
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
shell: bash
run: |
ss -ln
Expand All @@ -316,19 +295,20 @@ jobs:
run: git remote add quarkusio https://github.com/quarkusio/quarkus.git

- name: apt clean
if: "!startsWith(matrix.java.os-name, 'windows')"
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
shell: bash
run: sudo apt-get clean

- name: Reclaim Disk Space
if: "!startsWith(matrix.java.os-name, 'windows')"
if: "!startsWith(matrix.java.os-name, 'windows') && !startsWith(matrix.java.os-name, 'macos')"
run: .github/ci-prerequisites.sh

- name: Set up JDK ${{ matrix.java.java-version }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java.java-version }}
architecture: ${{ matrix.java.architecture || 'x64' }}

- name: Download Maven Repo
uses: actions/download-artifact@v3
Expand Down
27 changes: 27 additions & 0 deletions extensions/smallrye-graphql/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,31 @@
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28033 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
27 changes: 27 additions & 0 deletions integration-tests/hibernate-orm-graphql-panache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,31 @@
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28035 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
26 changes: 26 additions & 0 deletions integration-tests/hibernate-orm-rest-data-panache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,30 @@
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28035 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
26 changes: 26 additions & 0 deletions integration-tests/jackson/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,30 @@
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28035 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
27 changes: 27 additions & 0 deletions integration-tests/smallrye-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,31 @@
</plugin>
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28057 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
26 changes: 26 additions & 0 deletions integration-tests/spring-data-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,30 @@
</plugins>
</build>

<profiles>
<!-- Disabled pending fix of #28035 -->
<profile>
<id>mac-m1</id>
<activation>
<os>
<family>mac</family>
<arch>aarch64</arch>
</os>
<property>
<name>env.GITHUB_ACTIONS</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit dfb830c

Please sign in to comment.