Skip to content

Commit de347df

Browse files
committed
Use conda build over mambabuild
1 parent 26f0ceb commit de347df

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

.github/workflows/conda-package.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ on:
1818
env:
1919
PACKAGE_NAME: dpbench
2020
MODULE_NAME: dpbench
21-
# There is a separate action that removes defaults.
22-
CHANNELS: 'dppy/label/dev,conda-forge,intel,nodefaults'
2321
VER_JSON_NAME: 'version.json'
2422
VER_SCRIPT1: "import json; f = open('version.json', 'r'); j = json.load(f); f.close(); "
2523
VER_SCRIPT2: "d = j['dpbench'][0]; print('='.join((d[s] for s in ('version', 'build'))))"
@@ -54,38 +52,37 @@ jobs:
5452
with:
5553
fetch-depth: 0
5654

57-
- name: Setup miniconda
58-
uses: conda-incubator/setup-miniconda@v2
55+
- name: Setup conda-build
56+
uses: conda-incubator/setup-miniconda@v3
5957
with:
60-
python-version: ${{ matrix.python }}
61-
miniforge-variant: Mambaforge
62-
miniforge-version: latest
63-
activate-environment: "build"
64-
channels: ${{ env.CHANNELS }}
58+
auto-activate-base: true
59+
activate-environment: ""
6560
channel-priority: "disabled"
66-
run-post: false
67-
68-
- name: Disable defautls
69-
run: conda config --remove channels defaults
7061

7162
- name: Store conda paths as envs
7263
shell: bash -l {0}
7364
run: |
7465
echo "CONDA_BLD=$CONDA_PREFIX/conda-bld/${{ runner.os == 'Linux' && 'linux' || 'win' }}-64/" | tr "\\" '/' >> $GITHUB_ENV
7566
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
7667
77-
# boa is an extention to conda so we can use mamba resolver in conda build
7868
- name: Install conda-build
79-
run: mamba install boa
69+
run: conda install conda-build
8070

8171
- name: Configure MSBuild
8272
if: runner.os == 'Windows'
8373
uses: microsoft/[email protected]
8474
with:
8575
vs-version: '14.35'
8676

77+
- name: Set conda channels
78+
run: |
79+
conda config --append channels dppy/label/dev
80+
conda config --append channels conda-forge
81+
conda config --append channels nodefaults
82+
conda config --remove channels defaults
83+
8784
- name: Build conda package
88-
run: conda mambabuild --no-test --python ${{ matrix.python }} conda-recipe
85+
run: conda build --python ${{ matrix.python }} conda-recipe
8986

9087
- name: Upload artifact
9188
uses: actions/[email protected]
@@ -121,19 +118,20 @@ jobs:
121118
continue-on-error: ${{ matrix.experimental }}
122119

123120
steps:
124-
- name: Setup miniconda
125-
uses: conda-incubator/setup-miniconda@v2
121+
- name: Setup conda-build
122+
uses: conda-incubator/setup-miniconda@v3
126123
with:
127124
python-version: ${{ matrix.python }}
128-
miniforge-variant: Mambaforge
129-
miniforge-version: latest
130-
activate-environment: "build"
131-
channels: ${{ env.CHANNELS }}
125+
activate-environment: ""
126+
auto-activate-base: true
132127
channel-priority: "disabled"
133-
run-post: false
134128

135-
- name: Disable defautls
136-
run: conda config --remove channels defaults
129+
- name: Set conda channels
130+
run: |
131+
conda config --append channels dppy/label/dev
132+
conda config --append channels conda-forge
133+
conda config --append channels nodefaults
134+
conda config --remove channels defaults
137135
138136
- name: Store conda paths as envs
139137
shell: bash -l {0}
@@ -159,7 +157,7 @@ jobs:
159157
160158
# Needed to be able to run conda index
161159
- name: Install conda-build
162-
run: mamba install conda-build conda-index
160+
run: conda install conda-build conda-index
163161

164162
- name: Create conda channel
165163
run: python -m conda_index ${{ env.CHANNEL_PATH }}
@@ -170,7 +168,7 @@ jobs:
170168
cat ${{ env.VER_JSON_PATH }}
171169
172170
- name: Install dpbench
173-
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }}
171+
run: conda install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest intel::intel-opencl-rt python=${{ matrix.python }} -c ${{ env.CHANNEL_PATH }}
174172

175173
- name: Setup OpenCL CPU device
176174
if: runner.os == 'Windows'

0 commit comments

Comments
 (0)