Add core packages #81
Workflow file for this run
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
name: Build Recipes | |
on: | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install latest pyodide-build and build dependencies | |
run : | | |
pip install git+https://github.com/pyodide/pyodide.git@main#subdirectory=pyodide-build | |
pip install setuptools --upgrade | |
pyodide xbuildenv install --download --url http://pyodide-cache.s3-website-us-east-1.amazonaws.com/xbuildenv/dev/xbuildenv.tar.bz2 | |
sudo apt update | |
sudo apt install gfortran f2c | |
- name: Check emscripten version | |
run: | | |
echo EMSCRIPTEN_VERSION=$(pyodide config get emscripten_version) >> $GITHUB_ENV | |
- uses: mymindstorm/setup-emsdk@v11 | |
with: | |
version: ${{ env.EMSCRIPTEN_VERSION }} | |
- name: Build recipes | |
run: | | |
export PKG_CONFIG_PATH=$(pwd)/packages/.libs/lib/pkgconfig # FIXME: move to pyodide-build | |
pyodide build-recipes "*" --install --install-dir=./repodata | |
- name: Store artifacts build | |
uses: actions/upload-artifact@v2 | |
with: | |
name: repodata | |
path: ./repodata/ | |
retention-days: 15 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
files: | | |
./repodata/*.whl | |
test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
test-config: [ | |
{runner: selenium, runtime: chrome, runtime-version: latest }, | |
] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Download latest Pyodide | |
run: | | |
wget http://pyodide-cache.s3-website-us-east-1.amazonaws.com/xbuildenv/dev/pyodide-core.tar.bz2 | |
tar -xvf pyodide-core.tar.bz2 | |
mv pyodide dist | |
- uses: pyodide/pyodide-actions/install-browser@v1 | |
with: | |
runner: ${{ matrix.test-config.runner }} | |
browser: ${{ matrix.test-config.runtime }} | |
browser-version: ${{ matrix.test-config.runtime-version }} | |
- name: Install requirements | |
shell: bash -l {0} | |
run: | | |
python3 -m pip install pytest pytest-pyodide pytest-httpserver | |
- name: Download build artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: repodata | |
path: ./repodata/ | |
- name: Copy repodata | |
run: | | |
cp ./repodata/* ./dist/ | |
- name: Run tests | |
run: | | |
# FIXME: skip webworker tests | |
pytest -v \ | |
--dist-dir=./dist/ \ | |
--runner=${{ matrix.test-config.runner }} \ | |
--rt ${{ matrix.test-config.runtime }} \ | |
-k "not webworker" \ | |
packages |