Skip to content

Commit

Permalink
debug: update PATH of Linux and MacOS builds
Browse files Browse the repository at this point in the history
  • Loading branch information
cringeyburger committed Aug 14, 2024
1 parent ad4b3f8 commit 2607dcc
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ccache
which ccache
- name: Ccache cache
uses: actions/cache@v4
Expand All @@ -156,6 +155,7 @@ jobs:
mkdir -p $(pwd)/sundials_KLU_libs/lib64/
export LD_LIBRARY_PATH=$(pwd)/sundials_KLU_libs/lib64/:$LD_LIBRARY_PATH
export PATH=$(pwd)/sundials_KLU_libs/lib64/:$PATH
export PATH=/usr/bin/ccache:$PATH
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
python -m pip install cmake casadi scikit-build-core pybind11
Expand Down Expand Up @@ -191,6 +191,17 @@ jobs:
- name: Set macOS-specific environment variables
run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV

- name: Install ccache on MacOS
run: brew install ccache

- name: Ccache cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/*.cpp', '**/*.h') }}
restore-keys: ${{ runner.os }}-ccache-
- run: ccache -z

- name: Build wheels on macOS
uses: pypa/[email protected]
with:
Expand Down Expand Up @@ -272,8 +283,7 @@ jobs:
install_name_tool -id $(pwd)/sundials_KLU_libs/lib/libomp.dylib $(pwd)/sundials_KLU_libs/lib/libomp.dylib
codesign --force --sign - $(pwd)/sundials_KLU_libs/lib/libomp.dylib
brew install ccache
export PATH=/opt/homebrew/opt/ccache/libexec:$PATH
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
Expand All @@ -299,6 +309,9 @@ jobs:
set -e -x
python -c "import pybamm; print(pybamm.IDAKLUSolver())"
- name: Show ccache statistics
run: ccache -s

- name: Upload wheels for macOS (amd64, arm64)
uses: actions/[email protected]
with:
Expand Down

0 comments on commit 2607dcc

Please sign in to comment.