@@ -7,6 +7,8 @@ name: TryBot
77 - ci/test
88 - main
99 pull_request : {}
10+ schedule :
11+ - cron : 0 2 * * *
1012 workflow_dispatch : {}
1113jobs :
1214 test :
@@ -19,23 +21,23 @@ jobs:
1921 go-version :
2022 - stable
2123 runner :
22- - ubuntu-22.04
23- - macos-14
24+ - namespace-profile-linux-amd64
25+ - ns- macos-arm64
2426 runs-on : ${{ matrix.runner }}
2527 if : |-
2628 (contains(github.event.head_commit.message, '
2729 Dispatch-Trailer: {"type":"trybot"')) || ! (contains(github.event.head_commit.message, '
2830 Dispatch-Trailer: {"type":"'))
2931 steps :
3032 - name : Checkout code
31- uses : actions/checkout@v4
33+ uses : actions/checkout@v5
3234 with :
3335 ref : ${{ github.event.pull_request.head.sha }}
3436 fetch-depth : 0
3537 - name : Reset git directory modification times
3638 run : touch -t 202211302355 $(find * -type d)
3739 - name : Restore git file modification times
38- uses : chetan/git-restore-mtime-action@075f9bc9d159805603419d50f794bd9f33252ebe
40+ uses : chetan/git-restore-mtime-action@cbf8161ddb4e9b162409104954fb540e8a38c1da
3941 - id : DispatchTrailer
4042 name : Try to extract Dispatch-Trailer
4143 run : |-
@@ -62,13 +64,16 @@ jobs:
6264 echo "github.event.head_commit.message contains Dispatch-Trailer but we are on a protected branch"
6365 false
6466 - name : Install Go
65- uses : actions/setup-go@v5
67+ uses : actions/setup-go@v6
6668 with :
6769 cache : false
68- go-version : ${{ matrix.go-version }}
70+ go-version : 1.25.x
6971 - name : Set common go env vars
7072 run : |-
71- go env -w GOTOOLCHAIN=local
73+ case $(go env GOARCH) in
74+ amd64) go env -w GOAMD64=v3 ;; # 2013 and later; makes `go test -race` 15% faster
75+ arm64) go env -w GOARM64=v8.6 ;; # Apple M2 and later
76+ esac
7277
7378 # Dump env for good measure
7479 go env
@@ -77,36 +82,14 @@ jobs:
7782 with :
7883 distribution : temurin
7984 java-version : " 22"
80- - id : go-mod-cache-dir
81- name : Get go mod cache directory
82- run : echo "dir=$(go env GOMODCACHE)" >> ${GITHUB_OUTPUT}
83- - id : go-cache-dir
84- name : Get go build/test cache directory
85- run : echo "dir=$(go env GOCACHE)" >> ${GITHUB_OUTPUT}
86- - if : |-
87- (((github.ref == 'refs/heads/main') && (! (contains(github.event.head_commit.message, '
88- Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
89- uses: actions/cache@v4
85+ - if : github.event_name != 'schedule' && matrix.runner != 'ns-windows-amd64'
86+ uses : namespacelabs/nscloud-cache-action@v1
9087 with :
91- path: |-
92- ${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download
93- ${{ steps.go-cache-dir.outputs.dir }}
94- key: ${{ runner.os }}-${{ matrix.go-version }}-${{ github.run_id }}
95- restore-keys: ${{ runner.os }}-${{ matrix.go-version }}
96- - if : |-
97- ! (((github.ref == 'refs/heads/main') && (! (contains(github.event.head_commit.message, '
98- Dispatch-Trailer: {"type":"')))) || (github.ref == 'refs/heads/ci/test'))
99- uses: actions/cache/restore@v4
100- with:
101- path: |-
102- ${{ steps.go-mod-cache-dir.outputs.dir }}/cache/download
103- ${{ steps.go-cache-dir.outputs.dir }}
104- key: ${{ runner.os }}-${{ matrix.go-version }}-${{ github.run_id }}
105- restore-keys: ${{ runner.os }}-${{ matrix.go-version }}
88+ cache : go
10689 - if : |-
10790 github.repository == 'cue-lang/cue-api-java' && (((github.ref == 'refs/heads/main') && (! (contains(github.event.head_commit.message, '
108- Dispatch-Trailer: {"type":"')))) || github.ref == 'refs/heads/ci/test')
109- run: go clean -testcache
91+ Dispatch-Trailer: {"type":"')))) || ( github.ref == 'refs/heads/ci/test') )
92+ run: go env -w GOFLAGS=-count=1
11093 - name : Install CUE
11194 uses : cue-lang/setup-cue@v1.0.1
11295 with :
@@ -117,13 +100,13 @@ jobs:
117100 repository : cue-lang/libcue
118101 path : libcue
119102 - name : Build libcue
103+ working-directory : libcue
120104 run : |-
121105 go build -o libcue.so -buildmode=c-shared
122106 cp libcue.so libcue.dylib
123107 cp libcue.so cue.dll
124- working-directory : libcue
125108 - name : Early git and code sanity checks
126- run : go run cuelang.org/go/internal/ci/checks@v0.11.0-0.dev.0.20240903133435-46fb300df650
109+ run : go run cuelang.org/go/internal/ci/checks@v0.14.1
127110 - name : Test
128111 env :
129112 LD_LIBRARY_PATH : ${{ github.workspace }}/libcue
0 commit comments