Skip to content

Commit

Permalink
Merge branch 'main' into subclass-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanking13 authored Dec 20, 2024
2 parents 384c7b9 + 0cbdce2 commit 566774b
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
--cov=pyodide-build \
pyodide_build
- uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # v5.0.7
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
with:
fail_ci_if_error: false

Expand All @@ -58,15 +58,19 @@ jobs:
COMMIT_MSG=$(git log --no-merges -1 --oneline)
# The integration tests will be triggered on push or on pull_request when the commit
# message contains "[integration]"
if [[ "$GITHUB_EVENT_NAME" == push ||
# message contains "[integration]" or if it is pushed to main branch.
if [[ "$GITHUB_EVENT_NAME" == push && "$GITHUB_REF" == refs/heads/main ||
"$COMMIT_MSG" =~ \[integration\] ]]; then
echo "trigger=true" >> "$GITHUB_OUTPUT"
fi
integration-test:
runs-on: ubuntu-latest
needs: [check-integration-test-trigger]
strategy:
fail-fast: false
matrix:
task: [test-recipe, test-src]
if: needs.check-integration-test-trigger.outputs.run-integration-test
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
Expand Down Expand Up @@ -99,7 +103,7 @@ jobs:
with:
version: ${{ env.EMSCRIPTEN_VERSION }}

- name: Run the integration tests (recipes)
- name: Run the integration tests (${{ matrix.task }})
run: |
cd integration_tests
make test-recipe
make ${{ matrix.task }}
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
merge-multiple: true

- name: Generate artifact attestations
uses: actions/attest-build-provenance@ef244123eb79f2f7a7e75d99086184180e6d0018 # v1.4.4
uses: actions/attest-build-provenance@7668571508540a607bdfd90a87a560489fe372eb # v2.1.0
with:
subject-path: "dist/*"

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3
9 changes: 9 additions & 0 deletions integration_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ test-recipe: check

@echo "... Passed"

.PHONY: test-src
test-src: check
@echo "... Running integration tests for building src"

./src/numpy.sh

@echo "... Passed"

.PHONY: check
check:
@echo "... Checking dependencies"
Expand All @@ -23,4 +31,5 @@ check:
clean:
rm -rf .pyodide-xbuildenv*
rm -rf recipes/*/build
rm -rf src/numpy-*
rm -rf dist
1 change: 1 addition & 0 deletions integration_tests/src/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
numpy-*
13 changes: 13 additions & 0 deletions integration_tests/src/numpy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e

VERSION="2.0.2"
URL="https://files.pythonhosted.org/packages/source/n/numpy/numpy-${VERSION}.tar.gz"

wget $URL
tar -xf numpy-${VERSION}.tar.gz
cd numpy-${VERSION}

MESON_CROSS_FILE=$(pyodide config get meson_cross_file)
pyodide build -Csetup-args=-Dallow-noblas=true -Csetup-args=--cross-file="${MESON_CROSS_FILE}"

0 comments on commit 566774b

Please sign in to comment.