Skip to content

Commit 8e9e596

Browse files
authored
Merge pull request #44 from osqp/im/citest
Fix the PyPi uploading
2 parents 8b7a233 + a02c74a commit 8e9e596

File tree

1 file changed

+29
-30
lines changed

1 file changed

+29
-30
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,36 @@ jobs:
3131
if-no-files-found: error
3232

3333
build_wheels:
34-
name: Build wheel on ${{ matrix.os }}
34+
name: Build wheel on ${{ matrix.os }} for ${{ matrix.cibw_archs }}
3535
runs-on: ${{ matrix.os }}
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
# Include macos-13 to get Intel x86_64 macs and maos-latest to get the Aaarch64 macs
40-
os: [ubuntu-latest, macos-latest, macos-13, windows-2022]
41-
42-
# Build on the native architectures (macos-latest is arm64. macos-13 is x86_64)
4339
include:
44-
- os: macos-latest
45-
osx_arch: 'arm64'
46-
- os: macos-13
47-
osx_arch: 'x86_64'
40+
- os: ubuntu-latest
41+
cibw_archs: "x86_64"
42+
- os: ubuntu-latest
43+
cibw_archs: "aarch64"
44+
- os: windows-2022
45+
cibw_archs: "auto64"
46+
# Include macos-13 to get Intel x86_64 macs and maos-latest to get the Aaarch64 macs
47+
- os: macos-13
48+
cibw_archs: "x86_64"
49+
- os: macos-latest
50+
cibw_archs: "arm64"
51+
4852
steps:
4953
- uses: actions/checkout@master
5054
with:
5155
submodules: 'recursive'
5256

57+
# This might not be necessary once ARM runners become available for general use
58+
- name: Set up QEMU
59+
if: matrix.cibw_archs == 'aarch64'
60+
uses: docker/setup-qemu-action@v3
61+
with:
62+
platforms: arm64
63+
5364
- name: Add msbuild to PATH
5465
uses: microsoft/setup-msbuild@v2
5566
if: startsWith(matrix.os,'windows')
@@ -69,6 +80,7 @@ jobs:
6980
uses: pypa/cibuildwheel@v2.19.1
7081
env:
7182
CIBW_BUILD: "cp3*"
83+
CIBW_ARCHS: ${{ matrix.cibw_archs }}
7284
CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
7385
CIBW_MANYLINUX_X86_64_IMAGE: "dockcross/manylinux2014-x64"
7486
CIBW_TEST_REQUIRES: "pytest"
@@ -79,50 +91,37 @@ jobs:
7991
CIBW_BEFORE_BUILD: >-
8092
rm -rf {package}/c/build
8193
CIBW_ENVIRONMENT_LINUX: CMAKE_GENERATOR="Unix Makefiles"
82-
CIBW_ENVIRONMENT_MACOS: CMAKE_GENERATOR="Unix Makefiles" CMAKE_OSX_ARCHITECTURES=${{ matrix.osx_arch }}
94+
CIBW_ENVIRONMENT_MACOS: CMAKE_GENERATOR="Unix Makefiles" CMAKE_OSX_ARCHITECTURES=${{ matrix.cibw_archs }}
8395
CIBW_ENVIRONMENT_WINDOWS: CMAKE_GENERATOR="Visual Studio 17 2022" CMAKE_GENERATOR_PLATFORM=x64
8496
CIBW_BUILD_VERBOSITY: 1
8597

8698
- name: Upload artifacts to github
8799
uses: actions/upload-artifact@v4
88100
with:
89-
name: wheels-${{ matrix.os }}
101+
name: wheels-${{ runner.os }}-${{ matrix.cibw_archs }}
90102
path: ./wheelhouse/*.whl
91103
if-no-files-found: error
92104

93-
94-
merge_wheel_artifacts:
95-
name: Merge wheel artifacts
96-
runs-on: ubuntu-latest
97-
needs: [build_sdist, build_wheels]
98-
steps:
99-
- name: Merge artifacts
100-
uses: actions/upload-artifact/merge@v4
101-
with:
102-
name: wheels
103-
pattern: wheels-*
104-
delete-merged: true
105-
106-
107105
publish_to_pypi:
108106
name: Publish wheels to PyPi
109107
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
110-
needs: merge_wheel_artifacts
108+
needs: [build_sdist, build_wheels]
111109
runs-on: ubuntu-latest
112110
steps:
113111
- name: Download packages
114112
uses: actions/download-artifact@v4
115113
with:
116-
pattern: wheels*
117-
path: wheelhouse
114+
pattern: wheels-*
115+
path: dist
116+
merge-multiple: true
118117

119118
- name: Print out packages
120-
run: ls wheelhouse
119+
run: ls -la dist/*
121120

122121
- name: Upload wheels to pypi
123122
env:
124123
TWINE_USERNAME: __token__
125124
TWINE_PASSWORD: ${{ secrets.pypi_password }}
126125
run: |
127126
python -m pip install --upgrade twine
128-
twine upload wheelhouse/*
127+
twine upload dist/*

0 commit comments

Comments
 (0)