Test path length theory by installing SCT first #81
This file contains hidden or 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
name: Download dataset | |
on: | |
push: | |
branches: | |
- jn/4813-debug-sct-installer-repo-issues | |
# release: | |
# types: [published] | |
jobs: | |
run_dataset_download: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/spinalcordtoolbox/spinalcordtoolbox/blob/master/.ci.sh | |
- name: Install SCT | |
run: | | |
# source python/etc/profile.d/conda.sh >> $GITHUB_ENV | |
git clone https://github.com/spinalcordtoolbox/spinalcordtoolbox.git | |
cd spinalcordtoolbox | |
./.ci.sh -i | |
# NB: install_sct edits ~/.bashrc, but those environment changes don't get passed to subsequent steps in GH Actions. | |
# So, we filter through the .bashrc and pass the values to $GITHUB_ENV and $GITHUB_PATH. | |
# Relevant documentation: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#environment-files | |
cat ~/.bashrc | grep "export SCT_DIR" | cut -d " " -f 2 >> $GITHUB_ENV | |
cat ~/.bashrc | grep "export PATH" | grep -o "/.*" | cut -d ':' -f 1 >> $GITHUB_PATH | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
# python-version: 3.9.16 | |
python-version: 3.8.18 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
# pip install -r requirements.txt | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.9.16' | |
# - name: Install dependencies | |
# run: | | |
# conda install -y git-annex | |
# - name: Ensure git-annex is accessible via git | |
# run: | | |
# echo "$(conda info --base)/bin" >> $GITHUB_PATH | |
# export PATH="$(conda info --base)/bin:$PATH" | |
# which git-annex | |
# git-annex version | |
- name: Configure Git identity | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
# - name: Run dataset setup script | |
# shell: bash -l {0} # Ensures the Conda environment is properly loaded | |
# run: | | |
# chmod +x scripts/compute_morphometrics_spine_generic.sh | |
# source scripts/compute_morphometrics_spine_generic.sh | |
# - name: Run model script | |
# run: ./scripts/run_model.sh | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 |