Skip to content

Commit b17209c

Browse files
committed
Use setup-miniconda to install built distribution
1 parent f2cd632 commit b17209c

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/release.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,36 +82,42 @@ jobs:
8282
BLAS_IMPL: mkl
8383
ARCH: x86_64
8484
TARGET_PLATFORM: linux-64
85+
BASEPATH: "file:///home/runner/work/hyperspy-bundle/hyperspy-bundle/"
8586
- os: ubuntu
8687
os_version: latest
8788
INSTALLER_EXTENSION: sh
8889
BLAS_IMPL: openblas
8990
ARCH: x86_64
9091
TARGET_PLATFORM: linux-64
92+
BASEPATH: "file:///home/runner/work/hyperspy-bundle/hyperspy-bundle/"
9193
- os: windows
9294
os_version: latest
9395
INSTALLER_EXTENSION: exe
9496
BLAS_IMPL: mkl
9597
ARCH: x86_64
9698
TARGET_PLATFORM: win-64
99+
BASEPATH: "file:///D:/a/hyperspy-bundle/hyperspy-bundle/"
97100
- os: windows
98101
os_version: latest
99102
INSTALLER_EXTENSION: exe
100103
BLAS_IMPL: openblas
101104
ARCH: x86_64
102105
TARGET_PLATFORM: win-64
106+
BASEPATH: "file:///D:/a/hyperspy-bundle/hyperspy-bundle/"
103107
- os: macos
104108
os_version: '13'
105109
INSTALLER_EXTENSION: pkg
106110
BLAS_IMPL: mkl
107111
ARCH: x86_64
108112
TARGET_PLATFORM: osx-64
113+
BASEPATH: ""
109114
- os: macos
110115
os_version: latest
111116
INSTALLER_EXTENSION: pkg
112117
BLAS_IMPL: accelerate
113118
ARCH: arm64
114119
TARGET_PLATFORM: osx-arm64
120+
BASEPATH: ""
115121
env:
116122
DISPLAY: ':0'
117123

@@ -126,13 +132,17 @@ jobs:
126132
miniforge-version: latest
127133
channels: conda-forge
128134
channel-priority: strict
135+
auto-activate-base: false
136+
activate-environment: "build"
129137

130138
- name: Install constructor
131139
run: |
140+
conda activate build
132141
conda install constructor
133142
134143
- name: Conda info
135144
run: |
145+
conda activate build
136146
conda info
137147
conda list
138148
@@ -142,6 +152,7 @@ jobs:
142152
BLAS_IMPL: ${{ matrix.BLAS_IMPL }}
143153
CONDA_SOLVER: 'libmamba'
144154
run: |
155+
conda activate build
145156
constructor -v conda_distribution
146157
147158
- name: Set asset name
@@ -163,7 +174,7 @@ jobs:
163174
echo "asset_name=$new_installer_name" >> $GITHUB_ENV
164175
echo "Installer name: "$new_installer_name
165176
echo "#################################"
166-
installer_path="file://"$(readlink -f $new_installer_name)
177+
installer_path=${{ matrix.BASEPATH }}$new_installer_name
167178
echo "installer_path=$installer_path" >> $GITHUB_ENV
168179
echo "Installer path: "$installer_path
169180
echo "#################################"
@@ -181,12 +192,19 @@ jobs:
181192
name: ${{ env.asset_name }}
182193

183194
- uses: conda-incubator/setup-miniconda@v3
195+
if: runner.os != 'macos'
184196
with:
185197
channels: conda-forge
186198
installer-url: ${{ env.installer_path }}
187199
auto-activate-base: true
188200
activate-environment: ""
189201

202+
- name: Install new distribution (MacOS)
203+
if: runner.os == 'macos'
204+
run: |
205+
echo "install_dir=/Users/runner/hyperspy-bundle" >> $GITHUB_ENV
206+
installer -pkg ${{ env.asset_name }} -target CurrentUserHomeDirectory
207+
190208
- name: Info new distribution
191209
run: |
192210
conda info

0 commit comments

Comments
 (0)