File tree Expand file tree Collapse file tree 2 files changed +51
-2
lines changed
Expand file tree Collapse file tree 2 files changed +51
-2
lines changed Original file line number Diff line number Diff line change 4646 - run : mkdir build
4747 - run : >
4848 cmake
49- -DWITH_PYTHON=yes
49+ -DWITH_PYTHON=OFF
5050 -DFETCH_ABSEIL=ON
5151 -DCMAKE_CXX_STANDARD=17
5252 -DCMAKE_C_COMPILER_LAUNCHER=ccache
8888 --test_verbose_timeout_warnings --test_output=errors \
8989 //...
9090 working-directory : src
91+ python :
92+ strategy :
93+ matrix :
94+ target :
95+ - cp3*-manylinux_x86_64
96+ - cp3*-macosx_x86_64
97+ - cp3*-macosx_arm64
98+ runs-on : ${{ contains(matrix.target, 'macos') && 'macos-latest' || contains(matrix.target, 'win') && 'windows-latest' || 'ubuntu-latest' }}
99+ steps :
100+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
101+ with :
102+ fetch-tags : true
103+ persist-credentials : false
104+ - uses : pypa/cibuildwheel@8d2b08b68458a16aeb24b64e68a09ab1c8e82084 # v3.4.1
105+ with :
106+ package-dir : ./
107+ output-dir : dist/
108+ env :
109+ CIBW_BUILD : ${{ matrix.target }}
110+ CIBW_TEST_COMMAND : python -c "import s2geometry"
111+ - uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
112+ with :
113+ name : dist-${{ runner.os }}-${{ runner.arch }}
114+ path : ./dist/
115+ python-publish :
116+ if : (github.event_name == 'release') && (github.event.action == 'released')
117+ needs : [python]
118+ runs-on : ubuntu-latest
119+ permissions :
120+ id-token : write
121+ attestations : write
122+ # Requires environment protection rules in GitHub Settings:
123+ # Settings > Environments > pypi > Add required reviewers
124+ environment :
125+ name : pypi
126+ url : https://pypi.org/p/s2geometry
127+ steps :
128+ - uses : actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
129+ with :
130+ pattern : dist*
131+ path : dist/
132+ merge-multiple : true
133+ - uses : actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
134+ with :
135+ subject-path : " dist/*"
136+ # To upload to PyPI without a token, add this workflow file as a Trusted Publisher in the project settings on the PyPI website
137+ - uses : pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
Original file line number Diff line number Diff line change 2222 '-DCALL_FROM_SETUP_PY:BOOL=ON' ,
2323 '-DBUILD_SHARED_LIBS:BOOL=OFF' ,
2424 '-DCMAKE_POSITION_INDEPENDENT_CODE=ON' ,
25- '-DWITH_PYTHON=ON'
25+ '-DWITH_PYTHON=ON' ,
26+ '-DBUILD_TESTS=OFF' ,
27+ '-DFETCH_ABSEIL=ON' ,
2628 ]
2729 )
2830 ],
You can’t perform that action at this time.
0 commit comments