Skip to content

Commit

Permalink
ci: separate build/test emscripten wheel jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Jakubowski <tom@prospective.dev>
  • Loading branch information
tomjakubowski committed Jan 24, 2025
1 parent f131c67 commit 5e40a9e
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 22 deletions.
15 changes: 0 additions & 15 deletions .github/actions/install-deps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,6 @@ runs:
fi
if: ${{ runner.os == 'Linux' && inputs.cpp == 'true' && inputs.javascript == 'false' }}

- name: Install Python Pyodide dependencies
shell: bash
run: python -m pip install -r rust/perspective-python/requirements-pyodide.txt
if: ${{ inputs.pyodide == 'true' }}

- name: Install Pyodide distribution
shell: bash
run: pnpm run install_pyodide
if: ${{ inputs.pyodide == 'true' }}

- name: Install Python Playwright browsers
shell: bash
run: python -m playwright install
if: ${{ inputs.pyodide == 'true' }}

# - name: Install CCache
# shell: bash
# run: sudo apt install -y ccache
Expand Down
60 changes: 53 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ jobs:
id: init-step
uses: ./.github/actions/install-deps
with:
pyodide: "true"
javascript: "false"
arch: ${{ matrix.arch }}
manylinux: "false"
Expand All @@ -411,18 +410,64 @@ jobs:
PACKAGE: "perspective-python"
CI: 1

- uses: actions/upload-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-${{ matrix.python-version }}
path: rust/target/wheels/*.whl

# ~*~ Test pyodide ~*~
test_emscripten_wheel:
runs-on: ${{ matrix.os }}
needs: [build_emscripten_wheel]
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
arch:
- x86_64
python-version:
- 3.9
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Config
id: config-step
uses: ./.github/actions/config

- name: Initialize Build
uses: ./.github/actions/install-deps
with:
javascript: "false"
arch: ${{ matrix.arch }}
manylinux: "false"
skip_cache: ${{ steps.config-step.outputs.SKIP_CACHE }}

- uses: actions/download-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-${{ matrix.python-version }}
path: rust/target/wheels/

- name: Install Python Pyodide dependencies
shell: bash
run: python -m pip install -r rust/perspective-python/requirements-pyodide.txt

- name: Install Pyodide distribution
shell: bash
run: pnpm run install_pyodide

- name: Install Python Playwright browsers
shell: bash
run: python -m playwright install

- name: "Test Pyodide"
run: pnpm run test
env:
PSP_PYODIDE: 1
PACKAGE: "perspective-python"
CI: 1

- uses: actions/upload-artifact@v4
with:
name: perspective-python-dist-wasm32-emscripten-${{ matrix.python-version }}
path: rust/target/wheels/*.whl

# ,-,---. . . . ,--,--' .
# '|___/ . . . | ,-| ,-. ,-. ,-| `- | ,-. ,-. |-
# ,| \ | | | | | | ,-| | | | | , | |-' `-. |
Expand Down Expand Up @@ -859,6 +904,7 @@ jobs:
benchmark_js,
benchmark_python,
build_emscripten_wheel,
test_emscripten_wheel,
build_and_test_rust,
lint_and_docs,
]
Expand Down

0 comments on commit 5e40a9e

Please sign in to comment.