forked from PyWavelets/pywt
-
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.
- Loading branch information
Showing
19 changed files
with
254 additions
and
981 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,54 +29,29 @@ env: | |
jobs: | ||
build_wasm_emscripten: | ||
name: Build PyWavelets for Pyodide | ||
runs-on: ubuntu-latest | ||
# Uncomment the following line to test changes on a fork | ||
# if: github.repository == 'PyWavelets/pywt' | ||
runs-on: ubuntu-22.04 | ||
# Comment out the following line to test changes on a fork | ||
if: github.repository == 'PyWavelets/pywt' | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.11 | ||
id: setup-python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11.2" | ||
|
||
- name: Install prerequisites | ||
run: | | ||
python -m pip install pyodide-build "pydantic<2" | ||
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV | ||
- name: Set up Emscripten toolchain | ||
uses: mymindstorm/setup-emsdk@v14 | ||
with: | ||
version: ${{ env.EMSCRIPTEN_VERSION }} | ||
actions-cache-folder: emsdk-cache | ||
|
||
- name: Set up Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: "18" | ||
|
||
- name: Build PyWavelets | ||
run: | | ||
pyodide build | ||
- name: Install and test wheel | ||
run: | | ||
pyodide venv .venv-pyodide | ||
source .venv-pyodide/bin/activate | ||
pip install dist/*.whl | ||
pushd demo | ||
pip install matplotlib pytest | ||
python -c "import pywt; print(pywt.__version__)" | ||
pytest --pyargs pywt -m "not slow" | ||
- name: Build and test PyWavelets | ||
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3 | ||
env: | ||
CIBW_PLATFORM: pyodide | ||
CIBW_TEST_REQUIRES: pytest matplotlib | ||
CIBW_TEST_COMMAND: python -c "import pywt; pywt.test(extra_argv=['-m', 'not slow'])" | ||
|
||
# https://anaconda.org/scientific-python-nightly-wheels/pywavelets | ||
# WARNING: this job will overwrite existing wheels. | ||
- name: Push to Anaconda PyPI index | ||
if: (github.repository == 'PyWavelets/pywt') && (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') || (github.event_name == 'schedule') | ||
uses: scientific-python/upload-nightly-action@b67d7fcc0396e1128a474d1ab2b48aa94680f9fc # v0.5.0 | ||
- name: Push wheels to Anaconda PyPI index | ||
if: >- | ||
(github.repository == 'PyWavelets/pywt') && | ||
(github.event_name == 'push' && github.ref == 'refs/heads/main') || | ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.push_wheels == 'true') || | ||
(github.event_name == 'schedule') | ||
uses: scientific-python/upload-nightly-action@82396a2ed4269ba06c6b2988bb4fd568ef3c3d6b # v0.6.1 | ||
with: | ||
artifacts_path: dist/ | ||
artifacts_path: wheelhouse/ | ||
anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} |
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
Oops, something went wrong.