Skip to content

Commit ad1b1f3

Browse files
authored
Merge pull request #2308 from IntelPython/update-conda-in-workflow
[MAINT] Update Conda in base env in conda-package workflow
2 parents 99b0def + c0724e6 commit ad1b1f3

1 file changed

Lines changed: 39 additions & 12 deletions

File tree

.github/workflows/conda-package.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
VER_SCRIPT2: "print('='.join((d[s] for s in ('version', 'build'))))"
1717
VER_SCRIPT3: "print(' '.join(map(lambda s: chr(34) + s + chr(34), [comp for comp in d['depends'] if 'dpcpp' in comp][1:])))"
1818
INTEL_CHANNEL: "https://software.repos.intel.com/python/conda/"
19+
CONDA_BUILD_VERSION: 26.3.0
1920

2021
jobs:
2122
build_linux:
@@ -51,8 +52,18 @@ jobs:
5152
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
5253
- name: Add conda to system path
5354
run: echo "$CONDA/bin" >> "$GITHUB_PATH"
55+
- name: Update conda
56+
run: |
57+
conda update -n base --all
5458
- name: Install conda-build
55-
run: conda install conda-build -c conda-forge --override-channels
59+
run: |
60+
conda install -n base conda-build=${{ env.CONDA_BUILD_VERSION }} -c conda-forge --override-channels
61+
- name: Show Conda info
62+
run: |
63+
conda info --all
64+
- name: List base environment packages
65+
run: |
66+
conda list -n base
5667
- name: Store conda paths as envs
5768
shell: bash -l {0}
5869
run: |
@@ -94,16 +105,12 @@ jobs:
94105

95106
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
96107
with:
108+
auto-update-conda: true
97109
miniforge-version: latest
98110
activate-environment: build
99111
channels: conda-forge
100112
python-version: ${{ matrix.python }}
101-
102-
- name: Install conda build
103-
run: |
104-
conda install -n base -y conda-build
105-
conda list -n base
106-
113+
conda-build-version: ${{ env.CONDA_BUILD_VERSION }}
107114
- name: Cache conda packages
108115
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
109116
env:
@@ -115,13 +122,17 @@ jobs:
115122
restore-keys: |
116123
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
117124
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
118-
119125
- name: Store conda paths as envs
120126
shell: bash -l {0}
121127
run: |
122128
echo "CONDA_BLD=$CONDA/conda-bld/win-64/" | tr "\\\\" '/' >> "$GITHUB_ENV"
123129
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> "$GITHUB_ENV"
124-
130+
- name: Show Conda info
131+
run: |
132+
conda info --all
133+
- name: List base environment packages
134+
run: |
135+
conda list -n base
125136
- name: Build conda package
126137
env:
127138
OVERRIDE_INTEL_IPO: 1 # IPO requires more resources that GH actions VM provides
@@ -165,11 +176,18 @@ jobs:
165176
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
166177
- name: Add conda to system path
167178
run: echo "$CONDA/bin" >> "$GITHUB_PATH"
168-
- name: Install conda-index
169-
# Needed to be able to run conda index
179+
- name: Update conda
170180
run: |
171181
conda update -n base --all
172-
conda install conda-index -c conda-forge --override-channels
182+
- name: Install conda-index
183+
run: |
184+
conda install -n base conda-index -c conda-forge --override-channels
185+
- name: Show Conda info
186+
run: |
187+
conda info --all
188+
- name: List base environment packages
189+
run: |
190+
conda list -n base
173191
- name: Create conda channel
174192
run: |
175193
mkdir -p "$GITHUB_WORKSPACE/channel/linux-64"
@@ -265,6 +283,7 @@ jobs:
265283

266284
- uses: conda-incubator/setup-miniconda@8ee1f361103df19b6f8c8655fd3967a8ecb162d5 # v4.0.1
267285
with:
286+
auto-update-conda: true
268287
miniforge-version: latest
269288
channels: conda-forge
270289
activate-environment: ${{ env.TEST_ENV_NAME }}
@@ -274,6 +293,14 @@ jobs:
274293
run: |
275294
conda install -n base conda-index
276295
296+
- name: Show Conda info
297+
run: |
298+
conda info --all
299+
300+
- name: List base environment packages
301+
run: |
302+
conda list -n base
303+
277304
- name: Create conda channel with the artifact bit
278305
shell: cmd /C CALL {0}
279306
run: |

0 commit comments

Comments
 (0)