/
githubmirror
/
scikit-learn
Обзор
Документация
Войти
/
githubmirror
/
scikit-learn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/emscripten.yml
107 строк
3 KB
Stefanie Senger
MNT Disable pytest cacheprovider in Pyodide wheel builds (#34557)
24 июл 2026, 17:51
Не верифицирован
24 июл 2026, 17:51
9a210f7
Код
Авторство
О чём код?
name: Test Emscripten/Pyodide build on: schedule: # Nightly build at 3:42 A.M. - cron: "42 3 */1 * *" push: branches: - main # Release branches - "[0-9]+.[0-9]+.X" pull_request: branches: - main - "[0-9]+.[0-9]+.X" # Manual run workflow_dispatch: env: FORCE_COLOR: 3 concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true permissions: contents: read jobs: check_build_trigger: name: Check build trigger runs-on: ubuntu-latest if: github.repository == 'scikit-learn/scikit-learn' outputs: build: ${{ steps.check_build_trigger.outputs.build }} steps: - name: Checkout scikit-learn uses: actions/checkout@v7 with: ref: ${{ github.event.pull_request.head.sha }} persist-credentials: false - id: check_build_trigger name: Check build trigger shell: bash run: | set -e set -x COMMIT_MSG=$(git log --no-merges -1 --oneline) # The commit marker "[pyodide]" will trigger the build when required if [[ "$GITHUB_EVENT_NAME" == schedule || "$GITHUB_EVENT_NAME" == workflow_dispatch || "$COMMIT_MSG" =~ \[pyodide\] ]]; then echo "build=true" >> $GITHUB_OUTPUT fi build_wasm_wheel: name: Build WASM wheel runs-on: ubuntu-latest needs: check_build_trigger if: needs.check_build_trigger.outputs.build steps: - name: Checkout scikit-learn uses: actions/checkout@v7 with: persist-credentials: false - uses: pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1 env: CIBW_PLATFORM: pyodide SKLEARN_SKIP_OPENMP_TEST: "true" SKLEARN_SKIP_NETWORK_TESTS: 1 CIBW_TEST_REQUIRES: "pytest pandas" # pytest -s argument is needed to avoid an issue in pytest output capturing with Pyodide # -p no:cacheprovider is needed to avoid cleaning up pytest cache failing with PermissionError CIBW_TEST_COMMAND: "python -m pytest -sra -p no:cacheprovider --pyargs sklearn --durations 20 --showlocals" - name: Upload wheel artifact uses: actions/upload-artifact@v7 with: name: pyodide_wheel path: ./wheelhouse/*.whl if-no-files-found: error # Push to https://anaconda.org/scientific-python-nightly-wheels/scikit-learn # WARNING: this job will overwrite any existing WASM wheels. upload-wheels: name: Upload scikit-learn WASM wheels to Anaconda.org runs-on: ubuntu-latest permissions: {} environment: upload_anaconda needs: [build_wasm_wheel] if: github.repository == 'scikit-learn/scikit-learn' && github.event_name != 'pull_request' steps: - name: Download wheel artifact uses: actions/download-artifact@v8 with: path: wheelhouse/ merge-multiple: true - name: Push to Anaconda PyPI index uses: scientific-python/upload-nightly-action@e76cfec8a4611fd02808a801b0ff5a7d7c1b2d99 # 0.6.4 with: artifacts_path: wheelhouse/ anaconda_nightly_upload_token: ${{ secrets.SCIKIT_LEARN_NIGHTLY_UPLOAD_TOKEN }}