all: add Go 1.25 support

This commit is contained in:
Ayke van Laethem
2025-07-11 09:34:44 +02:00
committed by Ron Evans
parent 8911abbc6d
commit b33b6ce293
9 changed files with 37 additions and 23 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ jobs:
# This tests the latest supported LLVM version when linking against system
# libraries.
docker:
- image: golang:1.24-bullseye
- image: golang:1.25rc2-bullseye
steps:
- test-linux:
llvm: "20"
+2 -2
View File
@@ -39,7 +39,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
@@ -134,7 +134,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Build TinyGo (LLVM ${{ matrix.version }})
run: go install -tags=llvm${{ matrix.version }}
+4 -4
View File
@@ -18,7 +18,7 @@ jobs:
# statically linked binary.
runs-on: ubuntu-latest
container:
image: golang:1.24-alpine
image: golang:1.25rc2-alpine
outputs:
version: ${{ steps.version.outputs.version }}
steps:
@@ -137,7 +137,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Install wasmtime
uses: bytecodealliance/actions/wasmtime/setup@v1
@@ -181,7 +181,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Install Node.js
uses: actions/setup-node@v4
@@ -298,7 +298,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Restore LLVM source cache
uses: actions/cache/restore@v4
+4 -4
View File
@@ -41,7 +41,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Restore cached LLVM source
uses: actions/cache/restore@v4
@@ -147,7 +147,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
@@ -177,7 +177,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
@@ -213,7 +213,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
go-version: '1.25.0-rc.2'
cache: true
- name: Download TinyGo build
uses: actions/download-artifact@v4
+2 -2
View File
@@ -1,5 +1,5 @@
# tinygo-llvm stage obtains the llvm source for TinyGo
FROM golang:1.24 AS tinygo-llvm
FROM golang:1.25rc2 AS tinygo-llvm
RUN apt-get update && \
apt-get install -y apt-utils make cmake clang-15 ninja-build && \
@@ -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.24 AS tinygo-compiler
FROM golang:1.25rc2 AS tinygo-compiler
# Copy tinygo build.
COPY --from=tinygo-compiler-build /tinygo/build/release/tinygo /tinygo
+13 -9
View File
@@ -460,11 +460,15 @@ TEST_PACKAGES_HOST := $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_WINDOWS)
TEST_IOFS := false
endif
TEST_SKIP_FLAG := -skip='TestExtraMethods|TestParseAndBytesRoundTrip/P256/Generic'
# Test known-working standard library packages.
# TODO: parallelize, and only show failing tests (no implied -v flag).
.PHONY: tinygo-test
tinygo-test:
$(TINYGO) test $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
@# TestExtraMethods: used by many crypto packages and uses reflect.Type.Method which is not implemented.
@# TestParseAndBytesRoundTrip/P256/Generic: relies on t.Skip() which is not implemented
$(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
@# io/fs requires os.ReadDir, not yet supported on windows or wasi. It also
@# requires a large stack-size. Hence, io/fs is only run conditionally.
@# For more details, see the comments on issue #3143.
@@ -472,7 +476,7 @@ ifeq ($(TEST_IOFS),true)
$(TINYGO) test -stack-size=6MB io/fs
endif
tinygo-test-fast:
$(TINYGO) test $(TEST_PACKAGES_HOST)
$(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_HOST)
tinygo-bench:
$(TINYGO) test -bench . $(TEST_PACKAGES_HOST) $(TEST_PACKAGES_SLOW)
tinygo-bench-fast:
@@ -480,18 +484,18 @@ tinygo-bench-fast:
# Same thing, except for wasi rather than the current platform.
tinygo-test-wasm:
$(TINYGO) test -target wasm $(TEST_PACKAGES_WASM)
$(TINYGO) test -target wasm $(TEST_SKIP_FLAG) $(TEST_PACKAGES_WASM)
tinygo-test-wasi:
$(TINYGO) test -target wasip1 $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
$(TINYGO) test -target wasip1 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
tinygo-test-wasip1:
GOOS=wasip1 GOARCH=wasm $(TINYGO) test $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
GOOS=wasip1 GOARCH=wasm $(TINYGO) test $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) $(TEST_PACKAGES_SLOW) ./tests/runtime_wasi
tinygo-test-wasip1-fast:
$(TINYGO) test -target=wasip1 $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
$(TINYGO) test -target=wasip1 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
tinygo-test-wasip2-slow:
$(TINYGO) test -target=wasip2 $(TEST_PACKAGES_SLOW)
$(TINYGO) test -target=wasip2 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_SLOW)
tinygo-test-wasip2-fast:
$(TINYGO) test -target=wasip2 $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
$(TINYGO) test -target=wasip2 $(TEST_SKIP_FLAG) $(TEST_PACKAGES_FAST) ./tests/runtime_wasi
tinygo-test-wasip2-sum-slow:
TINYGO=$(TINYGO) \
@@ -517,7 +521,7 @@ tinygo-bench-wasip2-fast:
# Run tests on riscv-qemu since that one provides a large amount of memory.
tinygo-test-baremetal:
$(TINYGO) test -target riscv-qemu $(TEST_PACKAGES_BAREMETAL)
$(TINYGO) test -target riscv-qemu $(TEST_SKIP_FLAG) $(TEST_PACKAGES_BAREMETAL)
# Test external packages in a large corpus.
test-corpus:
+1 -1
View File
@@ -26,7 +26,7 @@ func NewConfig(options *compileopts.Options) (*compileopts.Config, error) {
// Version range supported by TinyGo.
const minorMin = 19
const minorMax = 24
const minorMax = 25
// Check that we support this Go toolchain version.
gorootMajor, gorootMinor, err := goenv.GetGorootVersion()
+4
View File
@@ -63,6 +63,10 @@ func SecCertificateCopyData(cert CFRef) ([]byte, error) {
return nil, errors.New("not implemented")
}
func SecTrustCopyCertificateChain(trustObj CFRef) (CFRef, error) {
return 0, errors.New("not implemented")
}
func SecTrustEvaluateWithError(trustObj CFRef) (int, error) {
return 0, errors.New("not implemented")
}
+6
View File
@@ -46,3 +46,9 @@ func timerCallback(tn *timerNode, delta int64) {
addTimer(tn)
}
}
//go:linkname time_runtimeIsBubbled time.runtimeIsBubbled
func time_runtimeIsBubbled() bool {
// We don't currently support bubbles.
return false
}