forked from numpy/numpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Re-enable Emscripten/Pyodide CI job for NumPy
This commit performs the following actions: 1. Adds WASM builds to the CPU family for Meson configurations, but without SSE or SIMD instructions. 2. Removes CPU feature detection message for an unsupported architecture. 3. Enables `IEEE_QUAD_LE` longdouble format for the wasm32 target (cross-builds). 4. Enables run for Emscripten/Pyodide wheels by setting the `if:` condition to `true`. 5. Uses recursive submodules to ensure that vendored-meson is received. 6. Moves the Meson cross file to `tools/ci/emscripten/` (i.e., creates a separate Emscripten folder to store relevant files) 7. Adds a patch for vendored-meson detection for Pyodide and applies this Pyodide-meson patch in the Emscripten CI jobs 8. Builds wasm32 wheels without BLAS and LAPACK support (see numpy#24750 (comment)) 9. Forces coloured and prettified outputs for test runs Some of these changes have been copied with updates and suggestions received from numpy#24603 on 23/02/2024 and authorship is preserved with this commit. [skip cirrus] [skip circle] [skip azp] Co-Authored-By: Ralf Gommers <[email protected]>
- Loading branch information
1 parent
43b61d7
commit 891c3cc
Showing
5 changed files
with
119 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tools/ci/emscripten/0001-do-not-set-meson-environment-variable-pyodide-gh-4502.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
From e08ebf0e90f632547c8ff5b396ec0c4ddd65aad4 Mon Sep 17 00:00:00 2001 | ||
From: Gyeongjae Choi <[email protected]> | ||
Date: Sat, 10 Feb 2024 03:28:01 +0900 | ||
Subject: [PATCH] Update numpy to 1.26.4 and don't set MESON env variable | ||
(#4502) | ||
|
||
From meson-python 0.15, $MESON env variable is used to overwrite the meson binary | ||
path. We don't want that behavior. | ||
--- | ||
pypabuild.py | 22 +++++++++++++++------- | ||
1 file changed, 15 insertions(+), 7 deletions(-) | ||
|
||
diff --git a/pypabuild.py b/pypabuild.py | ||
index 9d0107a8..6961b14e 100644 | ||
--- a/pypabuild.py | ||
+++ b/pypabuild.py | ||
@@ -40,6 +40,19 @@ AVOIDED_REQUIREMENTS = [ | ||
"patchelf", | ||
] | ||
|
||
+# corresponding env variables for symlinks | ||
+SYMLINK_ENV_VARS = { | ||
+ "cc": "CC", | ||
+ "c++": "CXX", | ||
+ "ld": "LD", | ||
+ "lld": "LLD", | ||
+ "ar": "AR", | ||
+ "gcc": "GCC", | ||
+ "ranlib": "RANLIB", | ||
+ "strip": "STRIP", | ||
+ "gfortran": "FC", # https://mesonbuild.com/Reference-tables.html#compiler-and-linker-selection-variables | ||
+} | ||
+ | ||
|
||
def _gen_runner( | ||
cross_build_env: Mapping[str, str], | ||
@@ -207,13 +220,8 @@ def make_command_wrapper_symlinks(symlink_dir: Path) -> dict[str, str]: | ||
symlink_path.unlink() | ||
|
||
symlink_path.symlink_to(pywasmcross_exe) | ||
- if symlink == "c++": | ||
- var = "CXX" | ||
- elif symlink == "gfortran": | ||
- var = "FC" # https://mesonbuild.com/Reference-tables.html#compiler-and-linker-selection-variables | ||
- else: | ||
- var = symlink.upper() | ||
- env[var] = str(symlink_path) | ||
+ if symlink in SYMLINK_ENV_VARS: | ||
+ env[SYMLINK_ENV_VARS[symlink]] = str(symlink_path) | ||
|
||
return env | ||
|
||
-- | ||
2.39.3 (Apple Git-145) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# compiler paths are omitted intentionally so we can override the compiler using environment variables | ||
[binaries] | ||
exe_wrapper = 'node' | ||
pkgconfig = 'pkg-config' | ||
|
||
[properties] | ||
needs_exe_wrapper = true | ||
skip_sanity_check = true | ||
longdouble_format = 'IEEE_QUAD_LE' # for numpy | ||
|
||
[host_machine] | ||
system = 'emscripten' | ||
cpu_family = 'wasm32' | ||
cpu = 'wasm' | ||
endian = 'little' |