Build conda package #22
Workflow file for this run
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
name: Build conda package | |
on: | |
push: | |
branches: | |
- conda | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: Version Override | |
default: "" | |
build: | |
type: string | |
description: Build Number | |
default: "0" | |
publish: | |
type: boolean | |
description: Publish to Anaconda wfp-ram channel | |
default: false | |
jobs: | |
conda: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: conda/build-env.yaml | |
environment-name: build | |
cache-environment: true | |
- name: Check conda env | |
shell: bash -l {0} | |
run: | | |
conda config --set solver libmamba | |
conda info | |
conda list | |
- name: Build hdc-algo-core | |
shell: bash -l {0} | |
run: | | |
if [[ -z "$build" ]] ; then | |
build=${GITHUB_RUN_NUMBER:-0} | |
fi | |
echo "Version is '$version', build is '$build'" | |
make -C conda VERSION=$version BUILD=$build build | |
env: | |
version: ${{ github.event.inputs.version }} | |
build: ${{ github.event.inputs.build }} | |
- name: Build hdc-algo meta package | |
shell: bash -l {0} | |
run: | | |
if [[ -z "$build" ]] ; then | |
build=${GITHUB_RUN_NUMBER:-0} | |
fi | |
echo "Version is '$version', build is '$build'" | |
make -C conda VERSION=$version BUILD=$build build-meta | |
env: | |
version: ${{ github.event.inputs.version }} | |
build: ${{ github.event.inputs.build }} | |
- name: Copy pkgs | |
shell: bash -l {0} | |
run: | | |
echo "List build directory" | |
find conda/build/ -type f | |
echo "Copy pkgs" | |
mkdir -p pkgs | |
touch pkgs/built-on-$(date +%Y%m%d).txt | |
find conda/build/ -type f -name "*.tar.bz2" | xargs -I{} mv {} pkgs/ | |
ls -lh pkgs/ | |
- name: Upload results (artifact) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pkgs | |
path: pkgs | |
if-no-files-found: error | |
- name: Publish to Anaconda | |
if: ${{ github.event.inputs.publish }} | |
shell: bash -l {0} | |
run: | | |
ls -lh pkgs/ | |
anaconda upload --skip-existing pkgs/*bz2 | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }} | |