Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ubuntu and mac conda builds #1744

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
8 changes: 5 additions & 3 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ requirements:
- conda-forge::ndx-pose
- conda-forge::importlib-metadata ==4.11.4

test:
imports:
- sleap
# This no longer works so we have moved it to the build workflow
# https://github.com/talmolab/sleap/pull/1744
# test:
# imports:
# - sleap
24 changes: 21 additions & 3 deletions .github/workflows/build_manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ on:
- '.github/workflows/build_manual.yml'
branches:
# - develop
- fakebranch
# - talmo/fix-mac-v140
# - fakebranch
- elizabeth/Fix-ubuntu-conda-build

jobs:
build:
Expand Down Expand Up @@ -78,25 +78,43 @@ jobs:
twine upload -u __token__ -p "$PYPI_TOKEN" dist/* --non-interactive --skip-existing --disable-progress-bar

# Build conda package (Ubuntu)
# echo "{environment_variable_name}={value}" >> "$GITHUB_ENV"
- name: Build conda package (Ubuntu)
if: matrix.os == 'ubuntu-22.04'
shell: bash -l {0}
run: |
conda build .conda --output-folder build
echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV"

# Build conda package (Windows)
# Build conda package (Windows)
- name: Build conda package (Windows)
if: matrix.os == 'windows-2022'
shell: powershell
run: |
conda build .conda --output-folder build
echo "BUILD_PATH=\$(pwd)\build" >> "$env:GITHUB_ENV"

# Build conda package (Mac)
- name: Build conda package (Mac)
if: matrix.os == 'macos-14'
shell: bash -l {0}
run: |
conda build .conda_mac --output-folder build
echo "BUILD_PATH=$(pwd)/build" >> "$GITHUB_ENV"

# Test
- name: Test built conda package
shell: bash -l {0}
run: |
echo "Build path is: $BUILD_PATH"
conda deactivate
echo $(conda info)
echo "Testing conda package with sleap"
conda create -y -n sleap_test -c file://$BUILD_PATH -c sleap/label/dev -c conda-forge -c nvidia -c anaconda sleap
conda activate sleap_test
echo $(conda list)
python -c "import sleap; print(sleap.__version__)"
echo "Test completed using sleap version: $(python -c 'import sleap; print(sleap.__version__)')"

# # Login to conda (Ubuntu)
# - name: Login to Anaconda (Ubuntu)
Expand Down
Loading