-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into shrivaths/add-zmq-training-gui
- Loading branch information
Showing
12 changed files
with
188 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,34 +18,41 @@ jobs: | |
include: | ||
# Use this condarc as default | ||
- condarc: .conda/condarc.yaml | ||
- pyver: "3.7" | ||
# Use special condarc if macos | ||
- os: "macos-14" | ||
condarc: .conda_mac/condarc.yaml | ||
pyver: "3.9" | ||
steps: | ||
# Setup | ||
- uses: actions/checkout@v2 | ||
- name: Cache conda | ||
uses: actions/cache@v1 | ||
env: | ||
# Increase this value to reset cache if environment_build.yml has not changed | ||
CACHE_NUMBER: 0 | ||
CACHE_NUMBER: 1 | ||
with: | ||
path: ~/conda_pkgs_dir | ||
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment_build.yml', 'requirements.txt') }} | ||
|
||
- name: Setup Miniconda | ||
# https://github.com/conda-incubator/setup-miniconda | ||
uses: conda-incubator/[email protected] | ||
uses: conda-incubator/[email protected] | ||
with: | ||
python-version: 3.7 | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | ||
environment-file: environment_build.yml | ||
miniforge-version: latest | ||
condarc-file: ${{ matrix.condarc }} | ||
python-version: ${{ matrix.pyver }} | ||
environment-file: environment_build.yml | ||
activate-environment: sleap_ci | ||
conda-solver: "libmamba" | ||
# Increase the cache number if build dependencies change! Otherwise, the cache will not be invalidated. | ||
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly! | ||
|
||
- name: Print environment info | ||
shell: bash -l {0} | ||
run: | | ||
which python | ||
conda info | ||
conda list | ||
# Build pip wheel (Ubuntu) | ||
- name: Build pip wheel (Ubuntu) | ||
|
@@ -69,21 +76,92 @@ jobs: | |
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 built conda package (Ubuntu and Windows) | ||
- name: Test built conda package (Ubuntu and Windows) | ||
if: matrix.os != 'macos-14' | ||
shell: bash -l {0} | ||
run: | | ||
echo "Current build path: $BUILD_PATH" | ||
conda deactivate | ||
echo "Python executable before activating environment:" | ||
which python | ||
echo "Python version before activating environment:" | ||
python --version | ||
echo "Conda info before activating environment:" | ||
conda info | ||
|
||
echo "Creating and testing conda environment with sleap package..." | ||
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 "Python executable after activating sleap_test environment:" | ||
which python | ||
echo "Python version after activating sleap_test environment:" | ||
python --version | ||
echo "Conda info after activating sleap_test environment:" | ||
conda info | ||
echo "List of installed conda packages in the sleap_test environment:" | ||
conda list | ||
echo "List of installed pip packages in the sleap_test environment:" | ||
pip list | ||
|
||
echo "Testing sleap package installation..." | ||
sleap_version=$(python -c "import sleap; print(sleap.__version__)") | ||
echo "Test completed using sleap version: $sleap_version" | ||
|
||
# Test built conda package (Mac) | ||
- name: Test built conda package (Mac) | ||
if: matrix.os == 'macos-14' | ||
shell: bash -l {0} | ||
run: | | ||
echo "Current build path: $BUILD_PATH" | ||
conda deactivate | ||
echo "Python executable before activating environment:" | ||
which python | ||
echo "Python version before activating environment:" | ||
python --version | ||
echo "Conda info before activating environment:" | ||
conda info | ||
|
||
echo "Creating and testing conda environment with sleap package..." | ||
conda create -y -n sleap_test -c file://$BUILD_PATH -c conda-forge -c anaconda sleap | ||
conda activate sleap_test | ||
|
||
echo "Python executable after activating sleap_test environment:" | ||
which python | ||
echo "Python version after activating sleap_test environment:" | ||
python --version | ||
echo "Conda info after activating sleap_test environment:" | ||
conda info | ||
echo "List of installed conda packages in the sleap_test environment:" | ||
conda list | ||
echo "List of installed pip packages in the sleap_test environment:" | ||
pip list | ||
|
||
echo "Testing sleap package installation..." | ||
sleap_version=$(python -c "import sleap; print(sleap.__version__)") | ||
echo "Test completed using sleap version: $sleap_version" | ||
|
||
# Login to conda (Ubuntu) | ||
- name: Login to Anaconda (Ubuntu) | ||
if: matrix.os == 'ubuntu-22.04' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.