Skip to content

Commit 568a0ae

Browse files
committed
Another attempt
1 parent 9dc5e7a commit 568a0ae

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/build_anaconda.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,41 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v4
4444

45-
- name: Set up Miniconda
45+
# ---------------------- IMPORTANT FIX ----------------------
46+
# Never use defaults. Only conda-forge ensures OpenBLAS stack.
47+
- name: Set up Miniconda (conda-forge only)
4648
uses: conda-incubator/setup-miniconda@v3
4749
with:
4850
auto-activate-base: false
4951
activate-environment: build
5052
python-version: ${{ matrix.python-version }}
51-
channels: conda-forge,defaults
52-
environment-file: environment.yml
53+
channels: conda-forge
54+
channel-priority: strict
5355
use-mamba: true
5456

57+
# Guarantee no MKL cache in runner
58+
- name: Configure clean package cache
59+
shell: bash
60+
run: |
61+
mkdir -p ${GITHUB_WORKSPACE}/conda-pkgs
62+
echo "CONDA_PKGS_DIRS=${GITHUB_WORKSPACE}/conda-pkgs" >> $GITHUB_ENV
63+
64+
# ---------------------- Required for Cython ----------------------
5565
- name: Set up MSVC toolchain
5666
uses: ilammy/msvc-dev-cmd@v1
5767
with:
5868
arch: x64
5969

70+
# ---------------------- Conda build ----------------------
6071
- name: Build conda package
6172
shell: bash -l {0}
6273
run: |
63-
CONDA_BASE=$(conda info --base)
74+
echo "Channels:"
75+
conda config --show channels
76+
echo "Building package for Python ${{ matrix.python-version }}"
77+
6478
mkdir -p build_artifacts
79+
6580
conda build . \
6681
--no-include-recipe \
6782
--output-folder build_artifacts
@@ -88,15 +103,17 @@ jobs:
88103
steps:
89104
- uses: actions/checkout@v4
90105

91-
- name: Set up Miniconda
106+
# Publishing environment ALSO must be conda-forge-only
107+
- name: Set up Miniconda (conda-forge only)
92108
uses: conda-incubator/setup-miniconda@v3
93109
with:
94110
auto-activate-base: false
95111
activate-environment: upload
112+
channels: conda-forge
113+
channel-priority: strict
96114
use-mamba: true
97-
channels: conda-forge,defaults
98115

99-
- name: Download all artifacts
116+
- name: Download artifacts
100117
uses: actions/download-artifact@v4
101118
with:
102119
path: packages
@@ -106,8 +123,6 @@ jobs:
106123
env:
107124
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
108125
run: |
109-
echo "Found packages:"
126+
echo "Packages ready for upload:"
110127
ls -R packages
111-
112-
# Upload everything recursively
113-
anaconda upload packages/**/*.tar.bz2
128+
anaconda upload packages/**/*.tar.bz2 --force

0 commit comments

Comments
 (0)