Skip to content

Commit

Permalink
internal/ci: update Linux to ubuntu-24.04
Browse files Browse the repository at this point in the history
GitHub made ubuntu-24.04 generally available back in September
via https://github.blog/changelog/2024-09-25-actions-new-images-and-ubuntu-latest-changes/
and is rolling it out to ubuntu-latest from December 5th as announced
in actions/runner-images#10636.

We are in no particular rush to update, but there's also no reason
to stay behind given that our needs from the OS are rather basic.
Moreover, since we pin the version, it can be easy to forget to update
once ubuntu-latest does switch to 24.04 for everyone else.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I3fe0823abb3bdea57078643b3e81725bd6e83b9f
Dispatch-Trailer: {"type":"trybot","CL":1204343,"patchset":1,"ref":"refs/changes/43/1204343/1","targetBranch":"master"}
  • Loading branch information
mvdan authored and cueckoo committed Nov 20, 2024
1 parent 5e0e2e7 commit 745cf17
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/evict_caches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Evict caches
jobs:
test:
if: ${{github.repository == 'cue-lang/cue'}}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
defaults:
run:
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_tip_to_trybot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Push tip to trybot
concurrency: push_tip_to_trybot
jobs:
push:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Write netrc file for cueckoo Gerrithub
run: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ name: Release
concurrency: release
jobs:
goreleaser:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{github.repository == 'cue-lang/cue'}}
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tip_triggers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Triggers on push to tip
- ci/test
jobs:
push:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{github.repository == 'cue-lang/cue'}}
defaults:
run:
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/trybot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- 1.22.x
- 1.23.x
runner:
- ubuntu-22.04
- ubuntu-24.04
- macos-14
- windows-2022
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -107,20 +107,20 @@ jobs:
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test')
run: go clean -testcache
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Early git and code sanity checks
run: go run ./internal/ci/checks
- if: |-
((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
Dispatch-Trailer: {"type":"')))) || !(matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Test
run: go test ./...
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Test with -race
run: go test -race ./...
env:
GORACE: atexit_sleep_ms=10
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Test on 32 bits
run: go test -short ./...
env:
Expand All @@ -131,31 +131,31 @@ jobs:
id: auth
if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.E2E_GCLOUD_KEY }}
- if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: gcloud setup for end-to-end tests
uses: google-github-actions/setup-gcloud@v2
- if: |-
github.repository == 'cue-lang/cue' && (((github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-branch.')) && (! (contains(github.event.head_commit.message, '
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test')) && (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: End-to-end test
env:
CUE_TEST_TOKEN: ${{ secrets.E2E_PORCUEPINE_CUE_TOKEN }}
run: |-
cd internal/_e2e
go test -race
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Go checks
run: |-
go vet ./...
go mod tidy
(cd internal/_e2e && go test -run=-)
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Check all git tags are available
run: |-
cd $(mktemp -d)
Expand All @@ -171,7 +171,7 @@ jobs:
echo "Did you forget about refs/attic branches? https://github.com/cue-lang/cue/wiki/Notes-for-project-maintainers"
exit 1
fi
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-22.04')
- if: (matrix.go-version == '1.23.x' && matrix.runner == 'ubuntu-24.04')
name: Generate
run: |-
go run cuelang.org/go/cmd/cue login --token=${CUE_TOKEN}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trybot_dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ name: Dispatch trybot
- ci/test
jobs:
trybot:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ ((github.ref == 'refs/heads/ci/test') && false) || github.event.client_payload.type == 'trybot' }}
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion internal/ci/repo/repo.cue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protectedBranchPatterns: [defaultBranch, releaseBranchPattern]
botGitHubUser: "cueckoo"
botGitHubUserEmail: "[email protected]"

linuxMachine: "ubuntu-22.04"
linuxMachine: "ubuntu-24.04"
macosMachine: "macos-14"
windowsMachine: "windows-2022"

Expand Down

0 comments on commit 745cf17

Please sign in to comment.