Skip to content

Commit

Permalink
[force ci] Test build pyodide.
Browse files Browse the repository at this point in the history
  • Loading branch information
hzhangxyz committed Sep 5, 2024
1 parent b3a11f6 commit 6d77983
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 104 deletions.
107 changes: 8 additions & 99 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ jobs:
matrix:
include:
- python: "3.11"
pyodide: "0.25.0"
pyodide: "0.25.1"
- python: "3.12"
pyodide: "0.26.0a2"
pyodide: "0.26.2"
- python: "3.12"
pyodide: "0.27.3"
- python: "3.12"
pyodide: "0.28.0"
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -140,17 +144,17 @@ jobs:
python -m pip install pyodide-build==${{ matrix.pyodide }}
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
pyodide config get emscripten_version
PYODIDE_EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version)
./emsdk install ${PYODIDE_EMSCRIPTEN_VERSION}
./emsdk activate ${PYODIDE_EMSCRIPTEN_VERSION}
- name: build
run: |
source emsdk/emsdk_env.sh
cd PyTAT
export SKBUILD_CMAKE_DEFINE=TAT_MATH_LIBRARIES=$PWD/.pyodide-xbuildenv/xbuildenv/pyodide-root/packages/.libs/lib/libopenblas.so
export SKBUILD_CMAKE_DEFINE="PYBIND11_FINDPYTHON=ON;TAT_MATH_LIBRARIES="
export CMAKE_BUILD_PARALLEL_LEVEL=4
pyodide build --exports pyinit
# pyodide auditwheel repair dist/*.whl --libdir .pyodide-xbuildenv/xbuildenv/pyodide-root/packages/.libs/lib
- name: test
run: |
cd PyTAT
Expand All @@ -171,105 +175,10 @@ jobs:
fail-fast: false
matrix:
include:
# Always support manylinux platform
- os: ubuntu-latest
python: 38
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: 39
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: 310
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: 311
platform_id: manylinux_x86_64
- os: ubuntu-latest
python: 312
platform_id: manylinux_x86_64

- os: ubuntu-latest
python: 38
platform_id: manylinux_aarch64
- os: ubuntu-latest
python: 39
platform_id: manylinux_aarch64
- os: ubuntu-latest
python: 310
platform_id: manylinux_aarch64
- os: ubuntu-latest
python: 311
platform_id: manylinux_aarch64
- os: ubuntu-latest
python: 312
platform_id: manylinux_aarch64

# Always support musllinux platform
- os: ubuntu-latest
python: 38
platform_id: musllinux_x86_64
- os: ubuntu-latest
python: 39
platform_id: musllinux_x86_64
- os: ubuntu-latest
python: 310
platform_id: musllinux_x86_64
- os: ubuntu-latest
python: 311
platform_id: musllinux_x86_64
- os: ubuntu-latest
python: 312
platform_id: musllinux_x86_64

- os: ubuntu-latest
python: 38
platform_id: musllinux_aarch64
- os: ubuntu-latest
python: 39
platform_id: musllinux_aarch64
- os: ubuntu-latest
python: 310
platform_id: musllinux_aarch64
- os: ubuntu-latest
python: 311
platform_id: musllinux_aarch64
- os: ubuntu-latest
python: 312
platform_id: musllinux_aarch64

# Only support the latest two version for macos platform
- os: macos-latest
python: 311
platform_id: macosx_x86_64
mac_arch: x86_64
- os: macos-latest
python: 312
platform_id: macosx_x86_64
mac_arch: x86_64

- os: macos-latest
python: 311
platform_id: macosx_arm64
mac_arch: arm64
- os: macos-latest
python: 312
platform_id: macosx_arm64
mac_arch: arm64

# Only support latest four version for windows platform
- os: windows-latest
python: 39
platform_id: win_amd64
- os: windows-latest
python: 310
platform_id: win_amd64
- os: windows-latest
python: 311
platform_id: win_amd64
- os: windows-latest
python: 312
platform_id: win_amd64

steps:
- name: checkout
uses: actions/checkout@v3
Expand Down
9 changes: 4 additions & 5 deletions PyTAT/test_wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ async function main() {

const pyodide = await require("pyodide").loadPyodide();
await pyodide.loadPackage("micropip");
await pyodide.loadPackage("openblas");
// openblas should be loaded manually before loading TAT
// see https://github.com/ryanking13/auditwheel-emscripten/issues/24
// when this been fixed, removing load openblas manually,
// and uncomment pyodide auditwheel in github action.

const mount_dir = "/app";
pyodide.FS.mkdir(mount_dir);
Expand All @@ -22,6 +17,8 @@ async function main() {
async def main():
import micropip
await micropip.install("openblas");
import os
files = os.listdir("/app/dist")
await micropip.install(f"emfs:/app/dist/{files[0]}")
Expand All @@ -36,6 +33,8 @@ async def main():
main()
`);

process.exit(result);
}

main();

0 comments on commit 6d77983

Please sign in to comment.