Skip to content

Commit

Permalink
skip most of conda matrix on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 29, 2024
1 parent 366ec2c commit 75e36e7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,29 @@ jobs:
cmake --build ./build --target install
- name: test
run: python -m unittest discover -v ./Wrappers/Python/test
conda-matrix:
runs-on: ubuntu-latest
outputs:
python-version: ${{ steps.matrix.outputs.python-version }}
numpy-version: ${{ steps.matrix.outputs.numpy-version }}
steps:
- id: matrix
run: |
if ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }}; then
echo "python-version=['3.10', 3.11]" >> $GITHUB_OUTPUT
echo "numpy-version=[1.23, 1.24, 1.25, 1.26]" >> $GITHUB_OUTPUT
else
echo "python-version=['3.10']" >> $GITHUB_OUTPUT
echo "numpy-version=[1.23]" >> $GITHUB_OUTPUT
fi
conda:
defaults: {run: {shell: 'bash -el {0}'}}
runs-on: ubuntu-latest
needs: conda-matrix
strategy:
matrix:
python-version: ['3.10', 3.11]
numpy-version: [1.23, 1.24, 1.25, 1.26]
python-version: ${{ fromJson(needs.conda-matrix.outputs.python-version) }}
numpy-version: ${{ fromJson(needs.conda-matrix.outputs.numpy-version) }}
include:
- python-version: 3.12
numpy-version: 1.26
Expand Down

0 comments on commit 75e36e7

Please sign in to comment.