From 3421a974789acb7b9b42b7fe7bb4e244d1dd0567 Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Wed, 28 Feb 2024 08:10:54 -0800 Subject: [PATCH] Add CI check to test patch file (#253) This tests that the patch file can apply in CI. --- .circleci/config.pkl | 18 +++++++++++++++++- .circleci/config.yml | 20 ++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/.circleci/config.pkl b/.circleci/config.pkl index bf1f55f9..16719c3e 100644 --- a/.circleci/config.pkl +++ b/.circleci/config.pkl @@ -21,7 +21,9 @@ import "jobs/GradleCheckJob.pkl" import "jobs/DeployJob.pkl" import "jobs/SimpleGradleJob.pkl" -local prbJobs: Listing = gradleCheckJobs.keys.toListing() +local prbJobs: Listing = (gradleCheckJobs.keys.toListing()) { + "check-patch-file" +} local buildAndTestJobs = (prbJobs) { "bench" @@ -151,4 +153,18 @@ jobs { } } } + ["check-patch-file"] { + docker { + new { image = "cimg/base:current" } + } + steps { + "checkout" + new RunStep { + // language=bash + command = #""" + git apply --reject patches/graalVm23.patch + """# + } + } + } } diff --git a/.circleci/config.yml b/.circleci/config.yml index 58e76a70..6ce542fa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -708,6 +708,13 @@ jobs: name: Publish release on GitHub docker: - image: maniator/gh:v2.40.1 + check-patch-file: + steps: + - checkout + - run: + command: git apply --reject patches/graalVm23.patch + docker: + - image: cimg/base:current trigger-docsite-build: steps: - run: @@ -749,6 +756,10 @@ workflows: requires: - hold - pr-approval/authenticate + - check-patch-file: + requires: + - hold + - pr-approval/authenticate when: matches: value: << pipeline.git.branch >> @@ -757,6 +768,7 @@ workflows: jobs: - gradle-check-jdk11 - gradle-check-jdk17 + - check-patch-file - bench - pkl-cli-macOS-amd64-snapshot - pkl-cli-linux-amd64-snapshot @@ -767,6 +779,7 @@ workflows: requires: - gradle-check-jdk11 - gradle-check-jdk17 + - check-patch-file - bench - pkl-cli-macOS-amd64-snapshot - pkl-cli-linux-amd64-snapshot @@ -797,6 +810,12 @@ workflows: ignore: /.*/ tags: only: /^v?\d+\.\d+\.\d+$/ + - check-patch-file: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ - bench: filters: branches: @@ -837,6 +856,7 @@ workflows: requires: - gradle-check-jdk11 - gradle-check-jdk17 + - check-patch-file - bench - pkl-cli-macOS-amd64-release - pkl-cli-linux-amd64-release