Skip to content

Publish (test)

Publish (test) #22

Workflow file for this run

name: Publish (test)
on:
release:
types:
- published
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
tags:
description: 'manual run'
jobs:
publish:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
python-version: ['3.10', '3.11']
os: [ubuntu-latest, macOS-14]
include:
- python-version: '3.10'
os: windows-latest
folder: das-win
- os: ubuntu-latest
folder: das-ubuntu
- os: macOS-14
folder: das-osxarm
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
defaults: # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Setup miniconda # https://github.com/marketplace/actions/setup-miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge,ncb
python-version: 3.12
auto-activate-base: false
activate-environment: anaconda-client-env
environment-file: build_env.yml
condarc-file: condarc.yml
- name: Build ${{ matrix.os }}
run: |
mkdir ./build
conda build conda/${{ matrix.folder}} --no-anaconda-upload --python ${{ matrix.python-version }} --output-folder ./build
# - name: Build (Ubuntu)
# if: matrix.os == 'ubuntu-latest'
# run: |
# mkdir ./build
# conda build conda/das-ubuntu --no-anaconda-upload --python ${{ matrix.python-version }} --output-folder ./build
# - name: Build (Windows)
# if: matrix.os == 'windows-latest'
# run: |
# mkdir ./build
# conda build conda/das-win --no-anaconda-upload --python ${{ matrix.python-version }} --output-folder ./build
# - name: Build (Mac arm)
# if: matrix.os == 'macOS-14'
# run: |
# mkdir ./build
# conda build conda/das-osxarm --no-anaconda-upload --python ${{ matrix.python-version }} --output-folder ./build
- name: Test
run: |
conda deactivate
conda create -n das_test python=${{ matrix.python-version }} das -c ./build -c conda-forge -c apple -c nvidia -c ncb -y
conda activate das_test
conda list
das version
python -c "import das; print(das.__version__)"
- name: Upload (${{ matrix.os }})
run: |
conda build conda/${{ matrix.folder }} --no-test --python ${{ matrix.python-version }} --output-folder ./build --user ncb --token ${{ secrets.ANACONDA_TOKEN }}
# - name: Upload (Ubuntu)
# if: matrix.os == 'ubuntu-latest'
# run: |
# conda build conda/das-ubuntu --no-test --python ${{ matrix.python-version }} --output-folder ./build --user ncb --token ${{ secrets.ANACONDA_TOKEN }}
# - name: Upload (Windows)
# if: matrix.os == 'windows-latest'
# run: |
# conda build conda/das-win --no-test --python ${{ matrix.python-version }} --output-folder ./build --user ncb --token ${{ secrets.ANACONDA_TOKEN }}
# - name: Upload (Mac arm)
# if: matrix.os == 'macOS-14'
# run: |
# conda build conda/das-osxarm --no-test --python ${{ matrix.python-version }} --output-folder ./build --user ncb --token ${{ secrets.ANACONDA_TOKEN }}