Skip to content

Commit

Permalink
CI: parametrize the package to build and upload the artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Rakitin committed Feb 2, 2024
1 parent d6211af commit 16ec8ca
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
jobs:
run_build:
runs-on: ubuntu-latest
strategy:
matrix:
packages: ["https://github.com/Pylons/paginate"]
fail-fast: false

steps:
- name: Check out the repo
uses: actions/checkout@v4
Expand All @@ -17,7 +22,16 @@ jobs:
with:
python-version: 3.11.2

- name: Set up env vars
- name: Define package to build
run: |
set -vxeuo pipefail
export PACKAGE_SOURCE="${{ matrix.packages }}"
# https://stackoverflow.com/a/3162500:
export PACKAGE_NAME="${PACKAGE_SOURCE##*/}"
echo PACKAGE_SOURCE=${PACKAGE_SOURCE} >> $GITHUB_ENV
echo PACKAGE_NAME=${PACKAGE_NAME} >> $GITHUB_ENV
- name: Set up env vars for EMSCRIPTEN_VERSION
run: |
set -vxeuo pipefail
pip install pyodide-build>=0.23.0
Expand All @@ -33,7 +47,12 @@ jobs:
- name: Build with Pyodide
run: |
set -vxeuo pipefail
git clone https://github.com/Pylons/paginate
cd paginate/
git clone ${{ env.PACKAGE_SOURCE }}
cd ${{ env.PACKAGE_NAME }}
pyodide build
ls -la
- uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }}
path: ${{ env.PACKAGE_NAME }}/dist/${{ env.PACKAGE_NAME }}-*.whl

0 comments on commit 16ec8ca

Please sign in to comment.