Skip to content

Fix typos

Fix typos #219

name: Build pyodide/wasm wheels
on:
push:
branches:
- main
paths:
- '**'
- '!*'
- '*.py'
- '!tests/**'
- '!doc/**'
- '!.github/**'
- '.github/pyodide_meta.yaml'
- '.github/pyodide_gsl_meta.yaml'
- '.github/workflows/build_pyodide_wheels.yml'
pull_request:
branches:
- main
paths:
- '**'
- '!tests/**'
- '!doc/**'
- '!.github/**'
- '.github/pyodide_meta.yaml'
- '.github/pyodide_gsl_meta.yaml'
- '.github/workflows/build_pyodide_wheels.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build pyodide/wasm wheels
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.10.2
- uses: mymindstorm/setup-emsdk@v12
with:
version: 3.1.14
- run: pip install pyodide-build==0.21.0
- name: Build wheel
run: |
# From https://github.com/pyodide/pyodide/issues/3002#issuecomment-1248513970
# Set up libs dir and pkg config
mkdir .libs
export LIBDIR=`pwd`/.libs
export PKG_CONFIG_PATH=`pwd`/.libs/lib/pkgconfig
# Build gsl
wget https://ftp.gnu.org/gnu/gsl/gsl-2.7.tar.gz
tar -xvzf gsl-2.7.tar.gz
cd gsl-2.7
emconfigure ./configure \
CFLAGS="-fPIC" \
--prefix=$LIBDIR \
--disable-dependency-tracking \
--disable-shared
emmake make -j 3
emmake make install
# Build galpy
cd ..
CFLAGS=`pkg-config --cflags-only-I --dont-define-prefix gsl` \
LDFLAGS=`pkg-config --libs-only-L --dont-define-prefix gsl` \
pyodide build
- name: Rename wheels to 'latest' version
run: |
GALPY_VERSION="$(awk '/^current_version/{print $NF}' .bumpversion.cfg)"
for f in dist/*$GALPY_VERSION*; do sudo mv -i -- "$f" "${f//$GALPY_VERSION/latest}"; done
- uses: actions/upload-artifact@v3
with:
name: galpy-wheel-pyodide
path: dist/*.whl
# Upload to AWS S3
- name: Upload to AWS S3
uses: jakejarvis/s3-sync-action@v0.5.1
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-2'
SOURCE_DIR: dist
DEST_DIR: wheelhouse