Skip to content

Device env composition + capability-scoped resolution (fdp device list/show/use) #49

Device env composition + capability-scoped resolution (fdp device list/show/use)

Device env composition + capability-scoped resolution (fdp device list/show/use) #49

Workflow file for this run

# Copyright 2024 General Atomics
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
name: Conda Package CI/CD
on:
push:
branches:
- main
tags:
- 'release-*'
pull_request:
branches:
- main
jobs:
build_and_test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: latest
# The pixi dev env (unlike the recipe build's run-deps env) installs the
# device contributors toksearch_d3d + toksearch_mast, so this run is the
# one place in CI where TestRealCatalogHasNoConflicts actually executes:
# it composes the real d3d + mast environments and fails if a future
# device introduces a colliding env var. Mock mode skips the
# network/token integration tests, so no BEARER_TOKEN is needed.
- name: Run unit tests (dev env, mock mode)
run: pixi run test-mock
- name: Build Conda package
run: |
pixi global install rattler-build
cd recipe && bash run_build.sh ${HOME}/outdir
- name: Upload to Anaconda
if: startsWith(github.ref, 'refs/tags/release-')
run: |
VERSION="${GITHUB_REF#refs/tags/release-}"
if [[ "$VERSION" =~ (rc|a|b)[0-9] ]]; then
LABEL="staging"
else
LABEL="main"
fi
rattler-build upload anaconda \
--owner ga-fdp \
--channel "$LABEL" \
--api-key ${{ secrets.ANACONDA_API_TOKEN }} \
--force \
${HOME}/outdir/*/*.conda