Skip to content

Commit

Permalink
ci: use Go 1.23
Browse files Browse the repository at this point in the history
  • Loading branch information
aykevl authored and deadprogram committed Aug 17, 2024
1 parent b6c53a6 commit 7e284a3
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ jobs:
# "make lint" fails before go 1.21 because internal/tools/go.mod specifies packages that require go 1.21
fmt-check: false
resource_class: large
test-llvm18-go122:
test-llvm18-go123:
docker:
- image: golang:1.22-bullseye
- image: golang:1.23-bullseye
steps:
- test-linux:
llvm: "18"
Expand All @@ -122,4 +122,4 @@ workflows:
# least the smoke tests still pass.
- test-llvm15-go119
# This tests LLVM 18 support when linking against system libraries.
- test-llvm18-go122
- test-llvm18-go123
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Build TinyGo (LLVM ${{ matrix.version }})
run: go install -tags=llvm${{ matrix.version }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# statically linked binary.
runs-on: ubuntu-latest
container:
image: golang:1.22-alpine
image: golang:1.23-alpine
steps:
- name: Install apk dependencies
# tar: needed for actions/cache@v4
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Install wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Install Node.js
uses: actions/setup-node@v4
Expand Down Expand Up @@ -307,7 +307,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Restore cached LLVM source
uses: actions/cache/restore@v4
Expand Down Expand Up @@ -143,7 +143,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# tinygo-llvm stage obtains the llvm source for TinyGo
FROM golang:1.22 AS tinygo-llvm
FROM golang:1.23 AS tinygo-llvm

RUN apt-get update && \
apt-get install -y apt-utils make cmake clang-15 ninja-build && \
Expand Down Expand Up @@ -33,7 +33,7 @@ RUN cd /tinygo/ && \

# tinygo-compiler copies the compiler build over to a base Go container (without
# all the build tools etc).
FROM golang:1.22 AS tinygo-compiler
FROM golang:1.23 AS tinygo-compiler

# Copy tinygo build.
COPY --from=tinygo-compiler-build /tinygo/build/release/tinygo /tinygo
Expand Down
2 changes: 0 additions & 2 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ endif
# Additional standard library packages that pass tests on individual platforms
TEST_PACKAGES_LINUX := \
archive/zip \
bytes \
compress/flate \
crypto/hmac \
debug/dwarf \
Expand All @@ -381,7 +380,6 @@ TEST_PACKAGES_LINUX := \
net \
os/user \
strconv \
testing/fstest \
text/tabwriter \
text/template/parse

Expand Down
4 changes: 2 additions & 2 deletions builder/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
if err != nil {
return nil, err
}
if major != 1 || minor < 19 || minor > 22 {
if major != 1 || minor < 19 || minor > 23 {
// Note: when this gets updated, also update the Go compatibility matrix:
// https://github.com/tinygo-org/tinygo-site/blob/dev/content/docs/reference/go-compat-matrix.md
return nil, fmt.Errorf("requires go version 1.19 through 1.22, got go%d.%d", major, minor)
return nil, fmt.Errorf("requires go version 1.19 through 1.23, got go%d.%d", major, minor)
}

return &compileopts.Config{
Expand Down
7 changes: 6 additions & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) {
}
}
if options.GOOS == "linux" && (options.GOARCH == "mips" || options.GOARCH == "mipsle") {
if name == "atomic.go" {
if name == "atomic.go" || name == "timers.go" {
// 64-bit atomic operations aren't currently supported on MIPS.
continue
}
Expand Down Expand Up @@ -246,6 +246,11 @@ func runPlatTests(options compileopts.Options, tests []string, t *testing.T) {
// some compiler changes).
continue

case "timers.go":
// Crashes starting with Go 1.23.
// Bug: https://github.com/llvm/llvm-project/issues/104032
continue

default:
}
}
Expand Down
1 change: 1 addition & 0 deletions src/syscall/syscall_libc_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const (
F_GETFL = 0x3
F_SETFL = 0x4
O_NONBLOCK = 0x4
TIOCSPGRP = 0x80047476
)

// Source: https://opensource.apple.com/source/xnu/xnu-7195.141.2/bsd/sys/errno.h.auto.html
Expand Down
4 changes: 4 additions & 0 deletions src/syscall/syscall_libc_wasi.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const (
// ../../lib/wasi-libc/expected/wasm32-wasi/predefined-macros.txt
F_GETFL = 3
F_SETFL = 4

// ../../lib/wasi-libc/libc-top-half/musl/arch/generic/bits/ioctl.h
TIOCSPGRP = 0x5410
)

// These values are needed as a stub until Go supports WASI as a full target.
Expand All @@ -114,6 +117,7 @@ const (
SYS_FCNTL
SYS_FCNTL64
SYS_FSTATAT64
SYS_IOCTL
SYS_OPENAT
SYS_UNLINKAT
PATH_MAX = 4096
Expand Down
2 changes: 1 addition & 1 deletion testdata/errors/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ func main() {
}

// ERROR: # command-line-arguments
// ERROR: types.go:4:6: a declared and not used
// ERROR: types.go:4:6: declared and not used: a
// ERROR: types.go:5:6: cannot use "foobar" (untyped string constant) as int value in assignment
// ERROR: types.go:6:2: undefined: nonexisting

0 comments on commit 7e284a3

Please sign in to comment.