Skip to content

Commit

Permalink
CI(GHActions): Create an additional env with Python 3.7
Browse files Browse the repository at this point in the history
Python 3.7 is needed for release script
to install `auditwheel` which requires at least Python 3.6.
  • Loading branch information
phdru committed Aug 8, 2023
1 parent b96880c commit 961b1cd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/test-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,22 @@ jobs:

# Setup Python/pip
- uses: actions/checkout@v2
# Python 3.7 is needed for ghactions-release script
- uses: s-weigand/setup-conda@v1
with:
conda-channels: conda-forge
python-version: "3.7"
if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }}
- uses: s-weigand/setup-conda@v1
with:
conda-channels: conda-forge
python-version: ${{ matrix.python-version }}
if: ${{ !contains(fromJSON(env.not_in_conda), matrix.python-version) }}
# Python 3.7 is needed for ghactions-release script
- run: |
__setup_conda_env="`conda env list | awk '/__setup_conda/ {print $2}'`"
conda install -n py37 python=3.7
py37_env="`echo $__setup_conda_env | sed 's/__setup_conda/py37/'`"
echo "$GITHUB_ENV"
cat "$GITHUB_ENV"
echo "$__setup_conda_env/bin:$py37_env/bin:$PATH" >> "$GITHUB_ENV"
cat "$GITHUB_ENV"
shell: bash
if: ${{ matrix.python-version == '2.7' && runner.os != 'Windows' && startsWith(github.ref, 'refs/tags/') }}
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
Expand Down

0 comments on commit 961b1cd

Please sign in to comment.