From 4ef6037f8a6b62114ee038d7b16903623e1d3af4 Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Thu, 22 Sep 2022 08:41:08 +0100 Subject: [PATCH 1/4] Run CI on MacOS Add MacOS to list of build runners. --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b910632d..add962fe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,14 +44,15 @@ jobs: os: - windows-latest - ubuntu-latest - # TODO: get working on MacOS - #- macos-latest + - macos-latest java-version: [ 11, 12, 13, 14, 15, 16, 17, 18 ] include: - os: windows-latest build-script: './mvnw.cmd' - os: ubuntu-latest build-script: './mvnw' + - os: macos-latest + build-script: './mvnw' steps: - name: Checkout repository From f3db26e76f7cdb9f995ef265a531196bc1d12722 Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Thu, 22 Sep 2022 08:55:59 +0100 Subject: [PATCH 2/4] Make prepare-test-outputs-for-merge compatible with MacOS --- scripts/prepare-test-outputs-for-merge.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/prepare-test-outputs-for-merge.sh b/scripts/prepare-test-outputs-for-merge.sh index 3ec1cb530..622a80e09 100755 --- a/scripts/prepare-test-outputs-for-merge.sh +++ b/scripts/prepare-test-outputs-for-merge.sh @@ -42,7 +42,10 @@ if ! command -v xsltproc >/dev/null 2>&1; then fi echo -e "\e[1;35mUpdating Surefire reports...\e[0m" -surefire_prefix_xslt=$(mktemp --suffix=.xslt) +surefire_prefix_xslt_dir="$(mktemp -d)" +trap "rm -Rf '${surefire_prefix_xslt_dir}'" EXIT SIGINT SIGTERM SIGQUIT SIGKILL +surefire_prefix_xslt="${surefire_prefix_xslt_dir}/surefire.xslt" + sed 's/^ //g' >"${surefire_prefix_xslt}" <<'EOF' @@ -87,8 +90,6 @@ for surefire_report in $(find-all-surefire-reports); do rm "${surefire_report}" done -rm "${surefire_prefix_xslt}" - echo -e "\e[1;35mUpdating Jacoco reports...\e[0m" for jacoco_report in $(find-all-jacoco-reports); do new_jacoco_report="${jacoco_report/.xml/-java-${ci_java_version}-${ci_os}.xml}" From 9daae98d7abad5d906943e826b421962ae5afd8f Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Thu, 22 Sep 2022 10:33:50 +0100 Subject: [PATCH 3/4] Don't trap untrappable SIGKILL --- scripts/prepare-test-outputs-for-merge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare-test-outputs-for-merge.sh b/scripts/prepare-test-outputs-for-merge.sh index 622a80e09..221706ea9 100755 --- a/scripts/prepare-test-outputs-for-merge.sh +++ b/scripts/prepare-test-outputs-for-merge.sh @@ -43,7 +43,7 @@ fi echo -e "\e[1;35mUpdating Surefire reports...\e[0m" surefire_prefix_xslt_dir="$(mktemp -d)" -trap "rm -Rf '${surefire_prefix_xslt_dir}'" EXIT SIGINT SIGTERM SIGQUIT SIGKILL +trap "rm -Rf '${surefire_prefix_xslt_dir}'" EXIT SIGINT SIGTERM SIGQUIT surefire_prefix_xslt="${surefire_prefix_xslt_dir}/surefire.xslt" sed 's/^ //g' >"${surefire_prefix_xslt}" <<'EOF' From caa1f121c391e3105d2506515ca306f4edc07f60 Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Thu, 22 Sep 2022 10:37:05 +0100 Subject: [PATCH 4/4] Make Sonatype Lift happy --- scripts/prepare-test-outputs-for-merge.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare-test-outputs-for-merge.sh b/scripts/prepare-test-outputs-for-merge.sh index 221706ea9..cd7770efd 100755 --- a/scripts/prepare-test-outputs-for-merge.sh +++ b/scripts/prepare-test-outputs-for-merge.sh @@ -43,7 +43,7 @@ fi echo -e "\e[1;35mUpdating Surefire reports...\e[0m" surefire_prefix_xslt_dir="$(mktemp -d)" -trap "rm -Rf '${surefire_prefix_xslt_dir}'" EXIT SIGINT SIGTERM SIGQUIT +trap 'rm -Rf "${surefire_prefix_xslt_dir}"' EXIT SIGINT SIGTERM SIGQUIT surefire_prefix_xslt="${surefire_prefix_xslt_dir}/surefire.xslt" sed 's/^ //g' >"${surefire_prefix_xslt}" <<'EOF'