Commit Graph

44 Commits

Author SHA1 Message Date
Conrad Burchert
ed2035a3cc Bazel: Migrate to bzlmod (#1530)
This migrates the bazel integration to the new Bazel dependency system
"bzlmod". bzlmod is becoming mandatory this year (see second sentence
here: https://bazel.build/external/migration).

This is a backwards incompatible migration, directly removing the old
WORKSPACE based approach. Users will have to change how they depend on
bzlmod, however I assume pretty much every user will be happy about it,
because they are forced to use bzlmod anyway or add extra flags to
continue to build with newer Bazel versions. Given that users normally
depend on specific git commits in the old system, they won't be hit with
this until they decide to upgrade emsdk.

The basic principle here is simple: I took everything that WORKSPACE did
and searched an alternative in bzlmod. Some interesting bits:

- We have less worries about multiple versions and people depending on
emscripten multiple times in different ways. This is resolved by the new
system: Bazel first iterates through the MODULE.bazel files recursively,
then finds the minimum version needed for each module and then executes
the module extensions that define repos exactly once at that version. So
no more ifs needed to detect multiple inclusions.
- A bunch of nodejs stuff moves to MODULE.bazel, because that is how the
nodejs module works now. As their module extension gets executed only
once you need to declare everything that you could need before that in
the MODULE.bazel file. A side effect of that is that we have to make a
fake repository when emscripten doesn't have an arm64 binary for linux,
because we can't actually figure that out in MODULE.bazel, so we have to
declare that it always exists and then create one in all cases.

There is a bunch of autoformatter changes in here as well, I could try
to revert them if you prefer.

Closes #1509
2025-04-09 14:38:12 -07:00
walkingeyerobot
ce1d281ce6 Fix bazel ci (#1504)
This is a temporary fix until I can do
https://bazel.build/external/migration
2024-12-14 02:39:55 +00:00
Christian Clauss
b644e2e6bb Python lint: Upgrade to flake8=7.1.1 (#1497) 2024-12-06 11:20:43 -08:00
Derek Schuff
4b9e83d629 Remove Intel mac CircleCI configuration (#1409)
Also switch bazel-mac to the arm64 config.
The CircleCI Intel mac config will be turned down soon.
2024-06-20 16:16:05 -07:00
冰雪殇璃陌梦
fc9146e09f Upgrade CI to Ubuntu 20.04 LTS (Focal) (#1183)
# Why
On one hand Ubuntu18's free LTS cycle is ended, and on the other hand Ubuntu18 does not support nodejs greater than v18.
# What's changed.
1. update the Linux Docker image to buildpack-deps:focal
2. some compatibility changes
3. use the new recommended way to install Docker ([see here](https://docs.docker.com/engine/install/ubuntu/))

See #1173
2024-05-28 11:34:36 -07:00
Sam Clegg
176dec4875 arm64-linux binaries are now available for all releases (#1369) 2024-04-10 16:32:54 -07:00
Sam Clegg
44bf7cfbe6 CI: Build latest docker image rather than tot (#1359)
This means that CI run that update `latest` actually test the thing
we are about to ship.

We recently had a case where `latest` was broken but `tot` was fixes
and we accidentally shipped a broken SDK version (#1353).
2024-03-14 09:45:41 -07:00
Sam Clegg
4f0128ee77 [ci] Update to latest version of cicleci windows orb (#1339)
See https://github.com/emscripten-core/emscripten/pull/21110
2024-01-29 22:28:36 +00:00
Jamie
b54a6b662f Auto-publish Arm64 images when emscripten-releases-tags.json is updated (#1231)
Add job to conditionally build arm64 images when emscripten-releases-tags.json updated
2023-12-03 21:11:09 -08:00
Derek Schuff
5d347a69dc Fix the format of the .flake8 file, and exclude the script directory from the py2 linter (#1272)
Flake8's INI config file format requires commas after each line. Because our file didn't have them, the exclude list
wasn't set up correctly, and the --extend-exclude flag wasn't working. This PR fixes the .flake8 file.

Also, update flake8 to the latest version available (because version 3.8 is required to get the --extend-exclude flag)
and use the flag to exclude the files in the scripts/ directory from the python2 linter (since the scripts are python3).
2023-08-24 09:17:36 -07:00
Sam Clegg
c88612d6d3 Fix activated_path_skip on repeated running of emsdk_env.sh (#1250)
The first time around `node` was being correctly added to the PATH, but
the second time around this code was observing the emsdk copy of node
in the PATH and assuming it could be skipped.

Fixes: #1240
2023-06-27 16:37:22 -07:00
Sam Clegg
88ee963cba Add some basic testing of arm64 linux (#1247) 2023-06-27 13:50:25 -07:00
Derek Schuff
d7327b4850 Update node, 15.14.0 -> 16.20.0 (#1232)
This allows us to use the native ARM64 version on MacOS.
Also update the test scripts to work on ARM64 mac, and skip tests that aren't relevant.
2023-06-20 18:57:05 +00:00
Derek Schuff
4b47cbf10b Update mac builders to use Circle's gen2 mac runner (#1222)
This runner is faster and more efficient.
Also factor the mac configuration into an executor.
2023-05-31 00:50:24 +00:00
John Firebaugh
9b87e80f3a Pin Windows CI to Bazel 5.4.0 (#1163) 2023-01-03 16:01:18 -08:00
Derek Schuff
8a1268ad8b Update remote_docker version in CircleCI config (#1117)
20.10.17 is the current default.
2022-11-21 11:38:45 -08:00
Sam Clegg
b6574f3a89 Update XCode version on CircleCI (#1103)
12.2 is being deprecated
2022-09-13 07:20:25 -07:00
Ezekiel Warren
b81dd8177d Using bazelisk on macOS CI (#1049) 2022-05-19 14:52:43 -07:00
Ezekiel Warren
774b871eca Bazel Windows Support (#929) 2021-12-20 14:24:56 -05:00
Sam Clegg
2ec227afbe Pass -Wno-unused-variable when building binaryen during CI (#938)
See https://github.com/emscripten-core/emsdk/pull/936
See https://github.com/WebAssembly/binaryen/issues/4353
2021-11-22 12:41:06 -08:00
Tim Talashok
c1589b5564 Use emsdk as external bazel dependency (#766)
* Makes provided bazel rules look up @emsdk workspace instead of local workspace
* Uses system-specific emscripten binaries instead of defaulting to linux
* Provides macros for loading emsdk dependencies (nodejs and emscripten binaries)
* Unhardcodes paths in bazel rules and .sh wrappers
* `update_bazel_workspace.sh` now updates `revisions.bzl`
* `emscripten_deps()` can be fed with specific emscripten version
* Adds external usage test

Addresses #650 and #696
2021-03-24 16:50:44 -07:00
Sam Clegg
7d155f8424 Move tests to "test" directory. NFC. (#745) 2021-03-08 08:03:07 -08:00
Amin Yahyaabadi
40780130aa fix: emsdk swallows/overwrites parts of PATH (#642)
This PR has three changes: 

1) Fixing --permanent flag:
The previous algorithm looped over the values of PATH 4 times to check conditions while these conditions are the opposite of each other. Also, the result did not include all the parts in the whole_path. 

	I have combined these loops and fixed the algorithm, so no path is lost. Now using --permanent the PATH and Env variables are correctly updated.

2) Fixing --system flag:
Now, the system flag does not cause the PATH values to be overwritten/clobbered. The PATH/Env variables are correctly updated.

3) Fixing flagless flag:
When no flag is provided the value of process/shell is correctly updated and preserved.

This adds the tests for all the situations.

Fixes #634
Fixes #645
2020-10-30 20:57:15 -07:00
Sam Clegg
4a695be348 circleci: Add explict version to setup_remote_docker. NFC. (#646)
Apparently we are supposed to do this:
 https://discuss.circleci.com/t/old-linux-machine-image-remote-docker-deprecation/37572
2020-10-27 12:59:50 -07:00
Sam Clegg
10290f2f1d Update mac circleci environment (#644)
Apparently `Image xcode:9.0 is not supported` these days.
2020-10-24 10:01:10 -07:00
Chris Savoie
4fe6e492c0 Fix environment variables to be consistently set when using --system or --permanent (#515)
Also switch PostMessage to SendMessageWithTimeout and only send one if
environment variables actually changed.

Also, enable and fix --permanent unit tests.
2020-10-09 12:58:59 -07:00
Amin Yahyaabadi
807e55cbec Set user environment variables permanently by using --permanent + deprecate --global (#621) 2020-09-29 22:15:22 -07:00
walkingeyerobot
5f630def2a add a wasm bazel toolchain (#603) 2020-09-10 18:42:46 -07:00
Kleis Auke Wolthuizen
645d276b5c Docker improvements (#571)
- Copy the current checkout to the Dockerfile.
- Add .dockerignore to exclude files while copying.
- Test tip-of-tree build within CI.
- Run the test suite outside the Docker image.
- Perform extra sanity tests.
- Switch to make commands for CircleCI.
- Improve Docker README.
2020-09-02 10:50:52 -07:00
Bob Tolbert
c1f0ad9fcd Fix emsdk_env.sh for multiple shells (#594)
This change allows sourcing emsdk_env.sh from bash, zsh and
ksh.

The script works out the true location of the emsdk directory,
even if it is a symlink or the script itself is a symlink.

Added a test in scripts/test_source_env.sh to try sourcing via
all the shells and with various paths.

Co-authored-by: Bob Tolbert <bob@tolbert.org>
2020-08-22 11:31:16 -07:00
Sam Clegg
4aa028017c Use bundled/embedded python3 binary on OSX (#561)
See https://github.com/emscripten-core/emscripten/issues/7198
2020-07-21 10:21:02 -07:00
Sam Clegg
eff1d2e2f1 Drop "-upstream" suffix from docker image name (#530) 2020-06-24 16:55:32 -07:00
Sam Clegg
dc74092927 Revert testing changes 2020-06-23 20:35:53 -07:00
Sam Clegg
618fcf36ee More circleci testing 2020-06-23 19:06:58 -07:00
Sam Clegg
8e5b6d8986 More circleci testing (sorry) 2020-06-23 18:56:39 -07:00
Sam Clegg
25416b8ff7 Testing circleci auto-publish of docker image (#531) 2020-06-23 18:50:16 -07:00
Sam Clegg
7241082595 Build docker image as part of CI (#527)
We only publish on tag, but we want to build and test the image
on all PRs.
2020-06-22 16:09:09 -07:00
Piotr Paczkowski (trzeci.eu)
01589e7afd Updated tagging schema for docker images (#519) 2020-06-09 08:36:37 -07:00
Jonathan Hale
24d88487f4 Set up build-docker-image job build docker image for tags on Circle CI (#513)
Signed-off-by: Squareys <squareys@googlemail.com>
2020-06-05 15:32:23 -07:00
Sam Clegg
5e996c6e69 test.py should require that the SDK be activated (#492)
It was working previously by accident because the tests were
using the defaults such as `$HOME/.emscripten`.  However usage of the
emsdk should really only happen in the emsdk environment where
EM_CONFIG dictates the config location (not just using the default).

This change is needed as precursor to making `--embedded` the default
(in this case the config doesn't live in `$HOME/.emscripten`).
2020-05-07 11:42:51 -07:00
Sam Clegg
e381caad2f Move test scripts into scripts directory (#485)
I'm planning on adding a some scripts for managing node and python
binaries and I don't want to clutter up the top level any more.
2020-05-04 13:40:24 -07:00
Alon Zakai
1458145cf4 1.39.8 (#440)
Also fix MacOS CI by installing Python3
2020-02-14 09:07:32 -08:00
Sam Clegg
3418c69437 Be more precise about which tests are disabled on macOS due to timestamp issue (#342) 2019-08-29 14:03:32 -07:00
Sam Clegg
880be59788 Add circleci config with mac, windows and linux testing (#338)
- Add EMSDK_NOTTY variable which we can use on CI to prevent tty output.
- Add test.bat for windows which mirrors test.sh.
- Remove travis support
2019-08-29 00:35:36 -07:00