Skip to content

Commit fe3487a

Browse files
committed
test: try using same mamba forge install method
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
1 parent 922e452 commit fe3487a

3 files changed

Lines changed: 20 additions & 21 deletions

File tree

‎.github/scripts/setup.sh‎

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ if [[ "$(uname)" == "Darwin" ]]; then
3636
export DYLD_LIBRARY_PATH=/usr/local/lib
3737

3838
# Ensure we activate micromamabe that has a pinned version
39-
eval "$(micromamba shell hook --shell bash)" || micromamba shell reinit --shell bash
40-
micromamba activate build-env
41-
echo "Found MacOS Python $(which python3)"
42-
PIP_INSTALL="python3 -m pip install"
39+
PIP_INSTALL="/opt/conda/bin/python3 -m pip install"
4340
ln -s $(which glibtoolize) /usr/local/bin/libtoolize
4441

4542
CPPFLAGS="-I${HOMEBREW_PREFIX}/include/lua"
@@ -93,6 +90,11 @@ else
9390
PIP_INSTALL="/opt/conda/envs/build/bin/python3 -m pip install"
9491
fi
9592

93+
# Ensure we find micromamba environment first
94+
export PATH=/opt/conda/bin:$PATH
95+
export LD_LIBRARY_PATH=/opt/conda/lib:/opt/conda/lib64
96+
echo "Found MacOS Python $(which python3)"
97+
9698
# Here we can start common setup (we hope)
9799
echo "Flux Version for pypi is ${FLUX_VERSION}"
98100
if [[ "$(uname)" == "Darwin" ]]; then
@@ -108,11 +110,11 @@ here=$(pwd)
108110
# I like how "--break-system-packages" is analogous with --i-acknowledge-i-am-a-terrible-person
109111
if [[ "$(uname)" == "Darwin" ]]; then
110112
echo "Installing python requirements for MacOS"
111-
${PIP_INSTALL} IPython setuptools ply sphinx cffi
113+
${PIP_INSTALL} IPython setuptools ply sphinx cffi pyyaml
112114
${PIP_INSTALL} -r .github/scripts/requirements-dev.txt
113115
else
114116
echo "Installing python requirements for Linux"
115-
${PIP_INSTALL} IPython || ${PIP_INSTALL} IPython --break-system-packages
117+
${PIP_INSTALL} IPython pyyaml || ${PIP_INSTALL} IPython --break-system-packages pyyaml
116118
${PIP_INSTALL} -r .github/scripts/requirements-dev.txt || ${PIP_INSTALL} -r .github/scripts/requirements-dev.txt --break-system-packages
117119

118120
# Flux Security --
@@ -136,10 +138,12 @@ chmod +x etc/gen-cmdhelp.py
136138

137139
./autogen.sh || echo "No autogen here"
138140

141+
export PYTHON=/opt/conda/bin/python3
142+
139143
if [[ "$(uname)" == "Darwin" ]]; then
140-
CPPFLAGS="$CPPFLAGS" LDFLAGS=$LDFLAGS PKG_CONFIG_PATH=$PKG_CONFIG_PATH \
141-
./configure --with-external-libev --prefix=/usr/local
142-
./scripts/check-macos.sh
144+
CPPFLAGS="$CPPFLAGS" LDFLAGS=$LDFLAGS PKG_CONFIG_PATH=$PKG_CONFIG_PATH ./configure --prefix=/usr/local
145+
ls ./scripts
146+
./scripts/check-macos.sh || echo "No check-macos.sh"
143147
else
144148
./configure --prefix=/usr/local
145149
make VERBOSE=1

‎.github/workflows/build-release.yaml‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,11 @@ jobs:
3232

3333
steps:
3434
- uses: actions/checkout@v4
35-
- name: Setup Python (Linux)
36-
if: runner.os == 'Linux'
35+
- name: Setup Python
3736
env:
3837
python_version: ${{ matrix.python }}
3938
run: /bin/bash ./docker/install-mamba.sh ${{ matrix.python }}
4039

41-
# Use micromamba for MacOS and hope someone else figured this out :)
42-
- name: Setup Python (macOS)
43-
if: runner.os == 'macOS'
44-
uses: mamba-org/setup-micromamba@v1
45-
with:
46-
environment-name: build-env
47-
create-args: python=${{ matrix.python }}
48-
4940
# The login shell ensures the mamba env is active
5041
- name: Build Flux Core Branch
5142
env:

‎docker/install-mamba.sh‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ sudo apt-get update && sudo apt-get install -y curl
66

77
# Install mamba for different python versions
88
# Python - instead of a system python we install mamba
9-
curl -L https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-x86_64.sh > mambaforge.sh
9+
if [[ "$(uname)" == "Darwin" ]]; then
10+
curl -L https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Darwin-x86_64.sh > mambaforge.sh
11+
else
12+
curl -L https://github.com/conda-forge/miniforge/releases/download/24.3.0-0/Mambaforge-24.3.0-0-Linux-x86_64.sh > mambaforge.sh
13+
fi
1014

1115
# Does not build 3.8
1216
# curl -L https://github.com/conda-forge/miniforge/releases/download/24.11.3-0/Miniforge3-24.11.3-0-Linux-x86_64.sh > mambaforge.sh
@@ -18,6 +22,6 @@ sudo /opt/conda/bin/mamba activate build
1822

1923
# This is intended to run in the container
2024
echo "Building Python version ${version}"
21-
/opt/conda/envs/build/bin/python3 -m pip install cffi ply six pyyaml jsonschema
25+
/opt/conda/envs/build/bin/python3 -m pip install cffi ply six pyyaml jsonschema yaml
2226
sudo chown -R $(id -u) /opt/conda
2327
/opt/conda/envs/build/bin/python3 -m pip install --upgrade pkginfo

0 commit comments

Comments
 (0)