Skip to content

Commit 311bba6

Browse files
committed
internal/ci: re-baseline base from cue-lang/cue@2d329b54
Includes: * Use CUE v0.10.0 in trybot workflow setup-cue. * Changes to use new multi-step installGo. * Use go1.23.x as the Go version for the repo. Change-Id: If3cd64c36e2810ae76c49747e83afe3972c4ea83 Signed-off-by: Paul Jolly <[email protected]> Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue-py/+/1200744 Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 9fc6219 commit 311bba6

File tree

12 files changed

+241
-254
lines changed

12 files changed

+241
-254
lines changed

.github/workflows/evict_caches.yml renamed to .github/workflows/evict_caches.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
echo Latest commit: $sha
9090
9191
echo "Trigger workflow on cue-lang/cue-py"
92-
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-py/actions/workflows/trybot.yml/dispatches -d "{\"ref\":\"$j\"}"
92+
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-py/actions/workflows/trybot.yaml/dispatches -d "{\"ref\":\"$j\"}"
9393
9494
# Ensure that the trybot repo has the latest commit for
9595
# this branch. If the force-push results in a commit
@@ -121,7 +121,7 @@ jobs:
121121
# We are up-to-date, i.e. the push did nothing, hence we need to trigger a workflow_dispatch
122122
# in the trybot repo.
123123
echo "Trigger workflow on cue-lang/cue-py-trybot"
124-
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-py-trybot/actions/workflows/trybot.yml/dispatches -d "{\"ref\":\"$j\"}"
124+
curl -s -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.CUECKOO_GITHUB_PAT }}" -H "X-GitHub-Api-Version: 2022-11-28" --fail-with-body -X POST https://api.github.com/repos/cue-lang/cue-py-trybot/actions/workflows/trybot.yaml/dispatches -d "{\"ref\":\"$j\"}"
125125
else
126126
echo "Force-push to cue-lang/cue-py-trybot did work; nothing to do"
127127
fi

.github/workflows/trybot.yml renamed to .github/workflows/trybot.yaml

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
go-version:
17-
- 1.22.x
17+
- 1.23.x
1818
python-version:
1919
- "3.12"
2020
runner:
@@ -65,45 +65,20 @@ jobs:
6565
false
6666
- uses: cue-lang/[email protected]
6767
with:
68-
version: v0.8.0
69-
- name: Early git and code sanity checks
68+
version: v0.10.0
69+
- name: Install Go
70+
uses: actions/setup-go@v5
71+
with:
72+
cache: false
73+
go-version: ${{ matrix.go-version }}
74+
- name: Set common go env vars
7075
run: |-
71-
# Ensure that commit messages have a blank second line.
72-
# We know that a commit message must be longer than a single
73-
# line because each commit must be signed-off.
74-
if git log --format=%B -n 1 HEAD | sed -n '2{/^$/{q1}}'; then
75-
echo "second line of commit message must be blank"
76-
exit 1
77-
fi
76+
go env -w GOTOOLCHAIN=local
7877
79-
# All authors, including co-authors, must have a signed-off trailer by email.
80-
# Note that trailers are in the form "Name <email>", so grab the email with sed.
81-
# For now, we require the sorted lists of author and signer emails to match.
82-
# Note that this also fails if a commit isn't signed-off at all.
83-
#
84-
# In Gerrit we already enable a form of this via https://gerrit-review.googlesource.com/Documentation/project-configuration.html#require-signed-off-by,
85-
# but it does not support co-authors nor can it be used when testing GitHub PRs.
86-
commit_authors="$(
87-
{
88-
git log -1 --pretty='%ae'
89-
git log -1 --pretty='%(trailers:key=Co-authored-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
90-
} | sort -u
91-
)"
92-
commit_signers="$(
93-
{
94-
git log -1 --pretty='%(trailers:key=Signed-off-by,valueonly)' | sed -ne 's/.* <\(.*\)>/\1/p'
95-
} | sort -u
96-
)"
97-
if [[ "${commit_authors}" != "${commit_signers}" ]]; then
98-
echo "Error: commit author email addresses do not match signed-off-by trailers"
99-
echo
100-
echo "Authors:"
101-
echo "${commit_authors}"
102-
echo
103-
echo "Signers:"
104-
echo "${commit_signers}"
105-
exit 1
106-
fi
78+
# Dump env for good measure
79+
go env
80+
- name: Early git and code sanity checks
81+
run: go run cuelang.org/go/internal/ci/[email protected]
10782
- name: Re-generate CI
10883
run: |-
10984
cue cmd importjsonschema ./vendor
@@ -112,11 +87,6 @@ jobs:
11287
- if: always()
11388
name: Check that git is clean at the end of the job
11489
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
115-
- name: Install Go
116-
uses: actions/setup-go@v5
117-
with:
118-
cache: false
119-
go-version: ${{ matrix.go-version }}
12090
- name: Install Python
12191
uses: actions/setup-python@v5
12292
with:

0 commit comments

Comments
 (0)