aboutsummaryrefslogtreecommitdiffhomepage
path: root/.circleci
AgeCommit message (Collapse)Author
2024-11-18ci: run at least some tests on older Go/LLVM versionsAyke van Laethem
These should make sure basic functionality is still working. Using the `-short` flag to avoid taking too long to run all tests (and to install all the necessary emulators), and because some targets might not work in older Go/LLVM versions (such as WASI). This does _not_ run tests and checks against expected IR, because LLVM IR changes a lot across versions.
2024-08-17ci: use Go 1.23Ayke van Laethem
2024-08-13circleci: our version of misspell is no longer supported with go < 1.21, so ↵Dan Kegel
disable lint in go 1.19 ci job I jumped through quite a few hoops to get test-llvm15-go119 to work, but this last hoop seems not worth jumping through: cd internal/tools && go generate -tags tools ./ /go/pkg/mod/github.com/golangci/[email protected]/mime.go:10:2: package slices is not in GOROOT (/usr/local/go/src/slices) tools.go:12: running "go": exit status 1 make: *** [GNUmakefile:952: tools] Error 1 I mean, we could patch misspell to not use slices, or to use the prerelease slices, but...
2024-06-12all: drop support for Go 1.18Ayke van Laethem
Go 1.18 has been unsupported for quite a while now (the oldest supported version is Go 1.21). But more importantly, the golang.org/x/tools module now requires Go 1.19 or later. So we'll drop this older version.
2024-05-24LLVM 18 supportAyke van Laethem
2024-04-13lint: add "make lint" target, run it from ciDan Kegel
See https://github.com/tinygo-org/tinygo/issues/4225 Runs in both circleci and github, circleci is run on branch push, github is run on PR Revive builds so fast, don't bother installing it; saves us wondering which one we get Uses tools.go idiom to give control over linter versions to go.mod. Also pacifies linter re AppendToGlobal as a token first fix. TODO: gradually expand the number of directories that are linted, uncomment more entries in revive.toml, and fix or suppress the warnings lint finds. TODO: add linters "go vet" and staticcheck NOT TODO: don't add metalinters like golangci-lint that pull in lots of new of dependencies; we'd rather not clutter go.mod that much, let alone open ourselves up to the additional attack surface.
2024-03-24ci: don't add --recursive when updating submodulesAyke van Laethem
It's not generally needed. It was added in https://github.com/tinygo-org/tinygo/pull/3958 to fix an issue with binaryen that has since been fixed in a different way, so we don't need the googletest dependency anymore.
2024-02-20ci: switch to Go 1.22Ayke van Laethem
2024-01-20all: switch to LLVM 17 by defaultAyke van Laethem
2024-01-19all: support Go 1.22Ayke van Laethem
This adds initial support for Go 1.22. Not all new features are supported yet.
2024-01-05all: statically link to LLVM 17 instead of LLVM 16Ayke van Laethem
We can now finally do it, now that Espressif has updated their fork.
2023-11-04Bump wasi-libc to SDK 20Elliott Sales de Andrade
The version 17 SDK adds `getpagesize`, so use it instead of hardcoding a number (even if their implementation is _also_ a hardcoded number.)
2023-10-16Binaryen116 (#3958)Flavio Castelli
dependencies: update binaryen submodule to version 116 Signed-off-by: Flavio Castelli <[email protected]> Co-authored-by: DarkByteBen <[email protected]>
2023-10-06all: add initial LLVM 17 supportAyke van Laethem
This allows us to test and use LLVM 17, now that it is available in Homebrew. Full support for LLVM 17 (including using it by default) will have to wait until Espressif rebases their Xtensa fork of LLVM.
2023-10-01all: remove LLVM 14 supportAyke van Laethem
This is a big change: apart from removing LLVM 14 it also removes typed pointer support (which was only fully supported in LLVM up to version 14). This removes about 200 lines of code, but more importantly removes a ton of special cases for LLVM 14.
2023-09-18all: switch to LLVM 16Ayke van Laethem
This commit adds support for LLVM 16 and switches to it by default. That means three LLVM versions are supported at the same time: LLVM 14, 15, and 16. This commit includes work by QuLogic: * Part of this work was based on a PR by QuLogic: https://github.com/tinygo-org/tinygo/pull/3649 But I also had parts of this already implemented in an old branch I already made for LLVM 16. * QuLogic also provided a CGo fix here, which is also incorporated in this commit: https://github.com/tinygo-org/tinygo/pull/3869 The difference with the original PR by QuLogic is that this commit is more complete: * It switches to LLVM 16 by default. * It updates some things to also make it work with a self-built LLVM. * It fixes the CGo bug in a slightly different way, and also fixes another one not included in the original PR. * It does not keep compiler tests passing on older LLVM versions. I have found this to be quite burdensome and therefore don't generally do this - the smoke tests should hopefully catch most regressions.
2023-02-03ci: switch to Go 1.20Ayke van Laethem
2023-01-17builder: add support for Go 1.20Ayke van Laethem
Not all features work yet, but allow it to compile with this Go version.
2022-11-06avr: drop GNU toolchain dependencyAyke van Laethem
- Use compiler-rt and picolibc instead of avr-libc. - Use ld.lld instead of avr-ld (or avr-gcc). This makes it much easier to get started with TinyGo on AVR because installing these extra tools (gcc-avr, avr-libc) can be a hassle. It also opens the door for future improvements such as ThinLTO. There is a code size increase but I think it's worth it in the long run. The code size increase can hopefully be reduced with improvements to the LLVM AVR backend and to compiler-rt.
2022-11-04esp: use LLVM Xtensa linker instead of Espressif toolchainAyke van Laethem
The Espressif fork of LLVM now has Xtensa support in the linker LLD. (This support was written mosly by me). This means we don't have to use the Espressif GNU toolchain anymore and makes installing TinyGo simpler. In the future, this also paves the way for ThinLTO support. Right now it is mostly just a way to simplify TinyGo installation and speed up CI slightly.
2022-09-25build: set circleci resource class to large for CI builddeadprogram
Signed-off-by: deadprogram <[email protected]>
2022-09-24ci: build TinyGo using Go 1.19Ayke van Laethem
We've supported Go 1.19 for a while now, let's actually use it in CI.
2022-08-30all: drop support for Go 1.16 and Go 1.17Ayke van Laethem
2022-08-04all: remove support for LLVM 13Ayke van Laethem
2022-06-19all: run gofmt on all source codeAyke van Laethem
Some source code wasn't part of `FMT_PATHS` so wasn't checked for correct formatting. This change includes all this source code and excludes cgo/testdata because it contains files that can't be parsed.
2022-06-16all: Go 1.19 supportAyke van Laethem
This adds early Go 1.19 support. There are a number of things that don't work yet, but the smoke tests pass so it's at least working for a significant subset of programs. This change also switches from CircleCI convenience images to upstream Go images. This makes it a bit easier to use the latest Go versions. Also, the convenience images are not updated anymore.
2022-05-18avr: use compiler-rtAyke van Laethem
This change adds support for compiler-rt, which supports float64 (unlike libgcc for AVR). This gets a number of tests to pass that require float64 support. We're still using libgcc with this change, but libgcc will probably be removed eventually once AVR support in compiler-rt is a bit more mature. I've also pushed a fix for a small regression in our xtensa_release_14.0.0-patched LLVM branch that has also been merged upstream. Without it, a floating point comparison against zero always returns true which is certainly a bug. It is necessary to correctly print floating point values.
2022-05-07all: remove support for LLVM 11 and LLVM 12Ayke van Laethem
This removes a lot of backwards compatibility cruft and makes it possible to start using features that need LLVM 13 or newer. For example: * https://github.com/tinygo-org/tinygo/pull/2637 * https://github.com/tinygo-org/tinygo/pull/2830
2022-05-03os: Drop support for go 1.15Dan Kegel
1.15 specific files deleted. 1.16 specific files folded carefully into generic files, with goal of reducing diff with upstream. Follows upstream 1.16 in making PathError etc. be aliases for the same errors in io/fs. This fixes #2817 and lets us add io/ioutil to "make test-tinygo" on linux and mac.
2022-04-23all: update to LLVM 14Ayke van Laethem
Switch over to LLVM 14 for static builds. Keep using LLVM 13 for regular builds for now. This uses a branch of the upstream Espressif branch to fix an issue, see: https://github.com/espressif/llvm-project/pull/59
2022-04-18Smoke test 1.15 still until we drop support for itDan Kegel
2022-04-18ci: updated supported go versions from 1.15-1.17 to 1.16-1.18Dan Kegel
2022-04-10all: use compiler-rt from LLVMAyke van Laethem
2022-02-03wasm: remove heap allocator from wasi-libcAyke van Laethem
This would conflict with our own heap. We previously defined all those functions to make sure it's not used, but with a more recent wasi-libc version (https://github.com/WebAssembly/wasi-libc/pull/250) we can simply not compile the wasi-libc heap, which is the proper fix.
2022-01-10ci: use GH action to perform build for macosdeadprogram
Signed-off-by: deadprogram <[email protected]>
2022-01-09all: switch to LLVM 13Ayke van Laethem
This adds support for building with `-tags=llvm13` and switches to LLVM 13 for tinygo binaries that are statically linked against LLVM. Some notes on this commit: * Added `-mfloat-abi=soft` to all Cortex-M targets because otherwise nrfx would complain that floating point was enabled on Cortex-M0. That's not the case, but with `-mfloat-abi=soft` the `__SOFTFP__` macro is defined which silences this warning. See: https://reviews.llvm.org/D100372 * Changed from `--sysroot=<root>` to `-nostdlib -isystem <root>` for musl because with Clang 13, even with `--sysroot` some system libraries are used which we don't want. * Changed all `-Xclang -internal-isystem -Xclang` to simply `-isystem`, for consistency with the above change. It appears to have the same effect. * Moved WebAssembly function declarations to the top of the file in task_asyncify_wasm.S because (apparently) the assembler has become more strict.
2021-12-21build: update XCode version for CircleCI builds to 11.4.1 due to deprecationsdeadprogram
Signed-off-by: deadprogram <[email protected]>
2021-11-30all: add LLVM 12 supportAyke van Laethem
Originally based on a PR by @QuLogic, but extended a lot to get all tests to pass.
2021-11-24ci: move Linux release builds to GitHub ActionsAyke van Laethem
2021-11-21ci: move assert-test-linux to GitHub ActionsAyke van Laethem
2021-11-20ci: run stdlib tests on macosAyke van Laethem
2021-11-17ci: move all cross compilation tests to LinuxAyke van Laethem
The idea here is as follows: - Run all Linux and cross compilation tests in the asser-test-linux job. - Only run native tests on MacOS and Windows. This reduces testing time on MacOS and Windows, which are generally more expensive in CI. Also, by not duplicating tests in Windows and MacOS we can reduce overall CI usage a bit. I've also changed the assert-test-linux job a bit to so that the tests that are more likely to break and the tests that are only run in assert-test-linux are run first.
2021-11-16ci: simplify build-linux jobAyke van Laethem
Split building the release and smoke-testing the release in two, and don't redo some tests that are already done by assert-test-linux. Some benefits: - Lower overall CI time because tests aren't done multiple times. - TinyHCI can run earlier because the build-linux job is finished as soon as the build artifact is ready. It does however have the downside of an extra job, which costs a few seconds to spin up and a few seconds to push and pull the workspace. But even with this, overall CI time is down by a few minutes per workflow run.
2021-11-16ci: simplify test-linux jobsAyke van Laethem
Instead of doing lots of repetitive tests in test-llvm11-go115 and test-llvm11-go116, do those tests only once in assert-test-linux and only run smoke tests for older Go versions. Benefits: - This should reduce total CI time, because these jobs don't do tests that are done elsewere anyway. They only do the minimal work necessary to prove that the given Go/LLVM version works. - Doing all tests in assert-test-linux hopefully catches bugs that might not be found in regular LLVM builds.
2021-11-14internal/task: use asyncify on webassemblyNia Waldvogel
This change implements a new "scheduler" for WebAssembly using binaryen's asyncify transform. This is more reliable than the current "coroutines" transform, and works with non-Go code in the call stack. runtime (js/wasm): handle scheduler nesting If WASM calls into JS which calls back into WASM, it is possible for the scheduler to nest. The event from the callback must be handled immediately, so the task cannot simply be deferred to the outer scheduler. This creates a minimal scheduler loop which is used to handle such nesting.
2021-11-04builder: build static binaries using musl on LinuxAyke van Laethem
This commit adds support for musl-libc and uses it by default on Linux. The main benefit of it is that binaries are always statically linked instead of depending on the host libc, even when using CGo. Advantages: - The resulting binaries are always statically linked. - No need for any tools on the host OS, like a compiler, linker, or libc in a release build of TinyGo. - This also simplifies cross compilation as no cross compiler is needed (it's all built into the TinyGo release build). Disadvantages: - Binary size increases by 5-6 kilobytes if -no-debug is used. Binary size increases by a much larger margin when debugging symbols are included (the default behavior) because musl is built with debugging symbols enabled. - Musl does things a bit differently than glibc, and some CGo code might rely on the glibc behavior. - The first build takes a bit longer because musl needs to be built. As an additional bonus, time is now obtained from the system in a way that fixes the Y2038 problem because musl has been a bit more agressive in switching to 64-bit time_t.
2021-11-03targets: add CPU property everywhereAyke van Laethem
This is for consistency with Clang, which always adds a CPU flag even if it's not specified in CFLAGS. This commit also adds some tests to make sure the Clang target-cpu matches the CPU property in the JSON files. This does have an effect on the generated binaries. The effect is very small though: on average just 0.2% increase in binary size, apparently because Cortex-M3 and Cortex-M4 are compiled a bit differently. However, when rebased on top of https://github.com/tinygo-org/tinygo/pull/2218 (minsize), the difference drops to -0.1% (a slight decrease on average).
2021-10-31all: drop support for LLVM 10Ayke van Laethem
2021-10-28ci: increase timeout to 20 minutesAyke van Laethem
2021-10-04build: double timeout period without output for make testdeadprogram
Signed-off-by: deadprogram <[email protected]>