Skip to content

main

main #14

Workflow file for this run

name: main
on:
workflow_dispatch:
inputs:
pyodide:
description: 'New Pyodide version to build for'
required: true
type: string
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get correct versions of everything for this pyodide version
run: |
wget https://raw.githubusercontent.com/pyodide/pyodide/main/pyodide-cross-build-environments.json
emscripten_ver=$(jq -r ".releases | .[\"${{ inputs.pyodide }}\"]| .emscripten_version" pyodide-cross-build-environments.json)
python_ver=$(jq -r ".releases | .[\"${{ inputs.pyodide }}\"]| .python_version" pyodide-cross-build-environments.json)
min_pyodide_build=$(jq -r ".releases | .[\"${{ inputs.pyodide }}\"]| .min_pyodide_build_version" pyodide-cross-build-environments.json)
echo PYVER=${python_ver}>>$GITHUB_ENV
echo EMVER=${emscripten_ver}>>$GITHUB_ENV
echo BUILDVER=${min_pyodide_build}>>$GITHUB_ENV
- uses: actions/setup-python@v5
with:
python-version: ${{ env.PYVER }}
- name: install pyodide build
run: pip install pyodide-build>=${{ env.BUILDVER }} wheel-filename
- name: Install emsdk ${{env.EMVER}}
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EMVER}}
actions-cache-folder: 'emsdk-cache'
- name: Arrow build
run: |
sudo apt-get install ninja-build
pyodide build-recipes-no-deps --recipe-dir . pyarrow
- name: Get info from built wheel file
run: |
# get arrow version and wheel name and make metafile
ARROW_WHEEL=$(basename pyarrow/dist/*.whl)
ARROW_VERSION=$(wheel-filename ${ARROW_WHEEL} | jq -r '.version')
ARROW_SHA256=$(sha256sum pyarrow/dist/*.whl | cut -d ' ' -f 1)
ARROW_RELEASE_URL=https://github.com/${{ github.repository_owner }}/${{ github.repository }}/releases/download/${{ inputs.pyodide }}/${ARROW_WHEEL}
echo ARROW_WHEEL=${ARROW_WHEEL}>>$GITHUB_ENV
echo ARROW_VERSION=${ARROW_VERSION}>>$GITHUB_ENV
echo ARROW_SHA256=${ARROW_SHA256}>>$GITHUB_ENV
sed "s:#RELEASE_URL#:${ARROW_RELEASE_URL}:g;s:#RELEASE_SHA256#:${ARROW_SHA256}:g;s:#RELEASE_VERSION#:${ARROW_VERSION}:g;"\
< pyarrow/_meta_built_template.yaml > pyarrow/dist/${ARROW_WHEEL}.yaml
- name: Upload the build artifacts for build debugging purposes
uses: actions/upload-artifact@v4
with:
name: build_wheel
path: pyarrow/dist
retention-days: 1
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ inputs.pyodide }}
name: Build of Arrow for pyodide ${{ inputs.pyodide}}. pyarrow version = ${{env.ARROW_VERSION}}
artifacts: pyarrow/dist/*
replacesArtifacts: true
allowUpdates: true
updateOnlyUnreleased: true
prerelease: true