Skip to content

Upload to new conda repo #6391

Upload to new conda repo

Upload to new conda repo #6391

Workflow file for this run

name: Testing with conda
on:
push:
branches:
- 'main'
- 'release-*'
pull_request:
release:
merge_group:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Needed to get tags so that git describe works during package build
fetch-depth: "0"
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y%V")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Miniforge and Pip packages
uses: actions/[email protected]
env:
CACHE_NUMBER: 0
with:
path: |
~/conda_pkgs_dir
~/.cache/pip
key:
${{runner.os}}-condapkg-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml')}}
- name: Cache Miniforge environment
uses: actions/[email protected]
id: cache-miniforge-environment
env:
CACHE_NUMBER: 0
with:
path: /usr/share/miniconda3/envs/mantidimaging-dev.cache
key:
${{runner.os}}-condaenv-${{env.CACHE_NUMBER}}-${{steps.get-date.outputs.date}}-${{hashFiles('environment-dev.yml','conda/meta.yaml', 'setup.py')}}
- name: Setup Miniforge
uses: conda-incubator/[email protected]
with:
miniforge-version: latest
activate-environment: mantidimaging-dev
auto-activate-base: false
use-mamba: true
- name: Mantid Imaging developer dependencies
if: steps.cache-miniforge-environment.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
conda deactivate
python3 ./setup.py create_dev_env
cp -Ta /usr/share/miniconda3/envs/mantidimaging-dev /usr/share/miniconda3/envs/mantidimaging-dev.cache
- name: Mantid Imaging developer dependencies - from cache
if: steps.cache-miniforge-environment.outputs.cache-hit == 'true'
shell: bash -l {0}
run: |
cp -Ta /usr/share/miniconda3/envs/mantidimaging-dev.cache /usr/share/miniconda3/envs/mantidimaging-dev
- name: Other dependencies
shell: bash -l {0}
run: |
sudo apt update -y
sudo apt-get install -y xvfb libxcb* libxkb*
- name: List versions
shell: bash -l {0}
run: |
mamba env list
python --version; mamba list ; pip list
# Always label as unstable. Builds of stable releases can be manually labeled to 'main' once tested
- name: publish 'unstable' package
uses: ./.github/actions/publish-package
with:
label: upload-test
token: ${{ secrets.ANACONDA_API_TOKEN_MANTIDIMAGING }}
token-old: ${{ secrets.ANACONDA_API_TOKEN }}