Skip to content

Commit

Permalink
CI: Parametrize package repos/versions better
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Rakitin committed Feb 2, 2024
1 parent 82c5e5a commit 06854a5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build packages with Pyodide

on:
push:
Expand All @@ -9,9 +9,11 @@ jobs:
run_build:
runs-on: ubuntu-latest
strategy:
matrix:
packages: ["https://github.com/Pylons/paginate"]
fail-fast: false
matrix:
packages:
- {repo: https://github.com/Pylons/paginate, version: "0.5.6"}
- {repo: https://github.com/gorakhargosh/watchdog, version: "2.3.1"}

steps:
- name: Check out the repo
Expand All @@ -25,10 +27,8 @@ jobs:
- 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
export PACKAGE_NAME="${${{ matrix.packages.repo }}##*/}"
echo PACKAGE_NAME=${PACKAGE_NAME} >> $GITHUB_ENV
- name: Set up env vars for Emscripten
Expand All @@ -47,7 +47,7 @@ jobs:
- name: Build with Pyodide
run: |
set -vxeuo pipefail
git clone ${{ env.PACKAGE_SOURCE }}
git clone --depth 1 --branch ${{ matrix.packages.version }} ${{ matrix.packages.repo }}
cd ${{ env.PACKAGE_NAME }}
pyodide build
ls -la
Expand Down

0 comments on commit 06854a5

Please sign in to comment.