From e48ebbd9d6793d286e642f173ebec81e031d5164 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 1 Dec 2021 18:27:34 -0500 Subject: [PATCH 1/2] Verify that lib/src is not changed on -doc backports --- .github/workflows/clean_pr.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/clean_pr.yml b/.github/workflows/clean_pr.yml index 05cc4f5039e5..51350aab6773 100644 --- a/.github/workflows/clean_pr.yml +++ b/.github/workflows/clean_pr.yml @@ -30,3 +30,14 @@ jobs: printf 'The following images were both added and modified in this PR:\n%s\n' "$am" exit 1 fi + - name: Check for invalid backports to -doc branches + if: endsWith(github.base_ref, '-doc') + run: | + git fetch --quiet origin "$GITHUB_BASE_REF" + base="$(git merge-base "origin/$GITHUB_BASE_REF" 'HEAD^2')" + lib="$(git log "$base..HEAD^2" --pretty=tformat: --name-status -- lib src | + cut --fields 2 | sort || true)" + if [[ -n "$lib" ]]; then + printf 'Changes to the following files have no effect and should not be backported:\n%s\n' "$lib" + exit 1 + fi From dce55e2857a6bf4509eb531c840dd1ae063e1065 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Wed, 1 Dec 2021 18:48:20 -0500 Subject: [PATCH 2/2] ci: Use released version to build v*-doc branches --- .circleci/config.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ad1a9439f0f..2fe1c92f11a0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,7 +104,15 @@ commands: steps: - run: name: Install Matplotlib - command: python -m pip install --user -ve . + command: | + if [[ "$CIRCLE_BRANCH" == v*-doc ]]; then + # The v*-doc branches must build against the specified release. + version=${CIRCLE_BRANCH%-doc} + version=${version#v} + python -m pip install matplotlib==${version} + else + python -m pip install --user -ve . + fi - save_cache: key: build-deps-1 paths: