I need some help setting up my CI. I try to upload my conda package via github action on release. It works for linux but on windows I get an error. This is the corresponding part from my github workflow release.yml
- name: Upload to Anaconda (Windows)
if: matrix.os == 'windows-latest'
env:
ANACONDA_LOGIN: ${{ secrets.ANACONDA_LOGIN }}
shell: pwsh
run: anaconda -v -t "$env:ANACONDA_LOGIN" upload -l dev build/win-64/*.tar.bz2
and I get this error:
2020-12-17T09:12:45.0904898Z ##[group]Run anaconda -v -t "$env:ANACONDA_LOGIN" upload -l dev build/win-64/*.tar.bz2
2020-12-17T09:12:45.0906005Z [36;1manaconda -v -t "$env:ANACONDA_LOGIN" upload -l dev build/win-64/*.tar.bz2[0m
2020-12-17T09:12:45.0959683Z shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
2020-12-17T09:12:45.0960327Z env:
2020-12-17T09:12:45.0960809Z CONDA_PKGS_DIR: C:\Users\runneradmin\conda_pkgs_dir
2020-12-17T09:12:45.0962425Z ANACONDA_LOGIN: ***
2020-12-17T09:12:45.0962882Z ##[endgroup]
2020-12-17T09:12:46.7759756Z Using Anaconda API: https://api.anaconda.org
2020-12-17T09:12:46.7761230Z [DEBUG] Using token from command line args
2020-12-17T09:12:46.8596811Z [ERROR] API server not found. Please check your API url configuration.
2020-12-17T09:12:46.9350900Z ##[error]Process completed with exit code 1.
Any help would be appreciated.
noarch: python
. Is using outputs
with noarch
not supported?
I tried doing something like (noarch
at the same level as script
):
outputs:
- name: foo
noarch: python
script: build.sh
But got:
File "/opt/conda/lib/python3.7/site-packages/conda_build/post.py", line 1038, in check_overlinking_impl
if filetype and filetype in filetypes_for_platform[subdir.split('-')[0]]:
KeyError: 'noarch'
Or do I have to redefine build
under each output?
package:
name: test
version: 0.0.1
build:
number: 0
script:
- mkdir -p $PREFIX/etc/OpenCL/vendors
- echo $PREFIX/lib > $PREFIX/etc/OpenCL/vendors/pocl.icd
test:
commands:
- cat $PREFIX/etc/OpenCL/vendors/pocl.icd
noarch: python
packages are typically build on Linux, thus the contained entrypoints won't work on Windows.
Trying to build a recipe with several subpackages. Using:
outputs:
- name: taurus-core
script: "{{ PYTHON }} -m pip install . --no-deps -vv"
build:
noarch: python
Gives me:
INFO conda_build.metadata:finalize_outputs_pass(748): Attempting to finalize metadata for taurus-core
Error: Failed to render jinja template in /home/conda/staged-recipes-copy/recipes/taurus/meta.yaml:
'PYTHON' is undefined
Is this expected? External script has to be used? Or is that a conda-build bug?
Looking at the warning above:
WARNING conda_build.metadata:_get_used_vars_output_script(2312): Not detecting used variables in output script /home/conda/staged-recipes/build_artifacts/taurus_1611351737826/_h_env_placehold_..._placehold_plac/bin/python -m pip install . --no-deps -vv;
conda-build only knows how to search .sh and .bat files right now.
And reading the documentation again:
Scripts that create or move files into the build prefix can be any kind of script. Known script types need only specify the script name.
It sounds like in outputs, script
has to be a file. It can't be a command. Or I'm missing something?
script:
commands:
- echo blah
requirements:
host:
- python
- pip
- setuptools
run:
- knobs
- pywin32
- typer
knobs
is a package I also built