Skip to content

Commit

Permalink
pybamm-team#3049 add suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Saransh Chopra <saransh0701@gmail.com>
  • Loading branch information
2 people authored and js1tr3 committed Aug 12, 2024
1 parent 4b6221d commit 277c853
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# name: Build and publish package to PyPI
name: Test building wheels
# Temporarily disable publishing to PyPI and enable
# building wheels on pull requests
name: Build and publish package to PyPI
on:
release:
types: [published]
Expand Down Expand Up @@ -32,15 +29,15 @@ jobs:
- name: Clone pybind11 repo (no history)
run: git clone --depth 1 --branch v2.11.1 https://github.com/pybind/pybind11.git

- name: Install vcpkg on windows
- name: Install vcpkg on Windows
run: |
cd C:\
rm -r -fo 'C:\vcpkg'
git clone https://github.com/microsoft/vcpkg --branch 2023.08.09
git clone https://github.com/microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
- name: Cache packages installed through vcpkg on windows
- name: Cache packages installed through vcpkg on Windows
uses: actions/cache@v3
env:
cache-name: vckpg_binary_cache
Expand All @@ -53,13 +50,13 @@ jobs:
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: Build 64 bits wheels on Windows
- name: Build 64-bit wheels on Windows
run: pipx run cibuildwheel --output-dir wheelhouse
env:
CIBW_ENVIRONMENT: 'PYBAMM_USE_VCPKG=ON VCPKG_ROOT_DIR=C:\vcpkg VCPKG_DEFAULT_TRIPLET=x64-windows-static-md VCPKG_FEATURE_FLAGS=manifests,registries CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64'
CIBW_ARCHS: "AMD64"

- name: Upload windows wheels
- name: Upload Windows wheels
uses: actions/upload-artifact@v3
with:
name: windows_wheels
Expand Down Expand Up @@ -105,8 +102,6 @@ jobs:
python -m pip
install cmake casadi numpy &&
python scripts/fix_casadi_rpath_mac.py && scripts/fix_suitesparse_rpath_mac.sh
# got error "re.error: multiple repeat at position 104" on python 3.7 when --require-archs added, so remove
# it for mac
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
delocate-listdeps {wheel} &&
delocate-wheel -v -w {dest_dir} {wheel}
Expand Down Expand Up @@ -151,10 +146,10 @@ jobs:
- name: Download all artifacts
uses: actions/download-artifact@v3

# - name: Move all package files to files/
# run: |
# mkdir files
# mv windows_wheels/* wheels/* sdist/* files/
- name: Move all package files to files/
run: |
mkdir files
mv windows_wheels/* wheels/* sdist/* files/
- name: Publish on PyPI
if: github.event.inputs.target == 'pypi' || github.event_name == 'release'
Expand Down

0 comments on commit 277c853

Please sign in to comment.