Skip to content

Commit

Permalink
Update PyPI test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
uschmidt83 committed Apr 25, 2024
1 parent 6606407 commit 6b0afb1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cibuildwheel.yml
Expand Up @@ -63,7 +63,7 @@ jobs:
build_wheels_mac:
# build wheels for macOS, using an x86_64-based runner to build both x86_64 and arm64 wheels
# (better would be to build arm64 wheels on an arm64-based runner, but c++ compilation throws errors and haven't debugged why)
# - arm64 wheels can only be build for python 3.7+
# - arm64 wheels can only be build for python 3.8+
# - arm64 wheels cannot be tested on an x86_64-based runner, so they are tested in a separate job
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
name: Build ${{ matrix.py }}-${{ matrix.cibw_arch }} wheels on ${{ matrix.os }}
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/tests_cron.yml
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
os: [ubuntu-20.04, windows-latest, macos-13]
os: [ubuntu-20.04, windows-latest, macos-latest] # macos-latest is arm64-based
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
tensorflow: [1, 2]
include:
Expand All @@ -35,6 +35,15 @@ jobs:
package-extras: 'test'
deps-extra: 'tf_keras'
exec-extra: 'echo "TF_USE_LEGACY_KERAS=1" >> $GITHUB_ENV'
# cases for using x86_64-based runner (macos-13)
- os: macos-13
python-version: '3.6' # no arm64 wheels
- os: macos-13
python-version: '3.7' # no arm64 wheels
- os: macos-13
python-version: '>=3.12 <3.13' # intentionally be different than '3.12' to cause an additional combination
tensorflow: 2
package-extras: 'test'
exclude:
# https://www.tensorflow.org/install/source#tested_build_configurations
- python-version: '3.8'
Expand Down Expand Up @@ -69,8 +78,8 @@ jobs:
if: ${{ matrix.deps-extra }}
run: pip install ${{ matrix.deps-extra }}

- name: Install package from source (just to test wheel building)
if: startsWith(matrix.os, 'windows') == false
- name: Install package from source (just to test wheel building) - Linux
if: startsWith(matrix.os, 'ubuntu')
run: pip install --no-binary stardist "stardist[${{ matrix.package-extras }}]"

- name: Install package from source (just to test wheel building) - Windows
Expand All @@ -81,9 +90,14 @@ jobs:
TMPDIR: "/tmp" # - /tmp should already exist on runner image
TMP: "/tmp" # - set all temp-related env variables (had issues with when omitting some)

# - name: Install package from source (just to test wheel building) - macOS
# if: startsWith(matrix.os, 'macos')
# run: ...

- name: Install package from wheel
shell: bash
run: |
pip uninstall -y stardist
[[ -z $(pip list | grep stardist) ]] && pip uninstall -y stardist
pip install --no-cache-dir --only-binary stardist "stardist[${{ matrix.package-extras }}]>0"
- name: Run extra commands (if any)
Expand Down

0 comments on commit 6b0afb1

Please sign in to comment.