Skip to content

Commit cb503c0

Browse files
authored
Merge pull request #17 from ukaea/release/2.8.0
Release/2.8.0
2 parents 6520839 + 83e73fa commit cb503c0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4670
-3235
lines changed

.github/workflows/build_test_wheels.yml

Lines changed: 0 additions & 166 deletions
This file was deleted.

.github/workflows/build_wheels.yml

Lines changed: 126 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,130 @@
11
name: build and upload wheels
22

3+
# Currently we aim to test building python wheels for all pushes to feature and release branches
4+
# HOWEVER we only want to upload these wheels to testpypi for release candidates, which are considered
5+
# to be pushes to a release branch or to develop.
6+
# finally, we only push tagged releases to pypi proper. Note that only a subset of platforms are considered
7+
# for test builds and the full suite (including longer-running builds) is only run on pushes to tags.
8+
# This is controlled using conditional statements for individual jobs and steps in this script.
39
on:
410
push:
511
tags:
612
- '*'
13+
branches:
14+
- release/*
15+
- feature/*
16+
- main
17+
- develop
718

819
jobs:
920
build_wheels:
10-
name: build wheels on ${{matrix.build-platform[0]}} ${{matrix.build-platform[1]}}
21+
name: build ${{matrix.build-platform[2]}} wheels on ${{matrix.build-platform[0]}} ${{matrix.build-platform[1]}}
1122
runs-on: ${{matrix.build-platform[0]}}
1223
strategy:
1324
fail-fast: false
1425
matrix:
1526
build-platform:
27+
# ubuntu/aarch64 emulation and manylinux2014 are both slow running builds
28+
# which are only executed on push to tag.
29+
# Test wheels are also generated for the other platforms (and uploaded to testpypi)
30+
# on pushes to release branches and to main
1631
- [ubuntu-latest, x86_64, manylinux2014_x86_64]
1732
- [ubuntu-latest, x86_64, manylinux_2_28_x86_64]
18-
- [ubuntu-latest,aarch64,manylinux_2_28_aarch64]
33+
- [ubuntu-latest, aarch64, manylinux_2_28_aarch64]
1934
- [macos-13, x86_64, macosx_x86_64]
2035
- [macos-14, arm64, macosx_arm64]
36+
- [windows-latest, AMD64, win_amd64]
2137

2238
steps:
2339
- uses: actions/checkout@v3
24-
# need git tags available for setuptools_scm to grab tags? will elad to slower checkout
40+
# need git tags available for setuptools_scm to grab tags
2541
with:
2642
fetch-depth: 0
2743

44+
- uses: actions/github-script@v6
45+
with:
46+
script: |
47+
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
48+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
49+
2850
- name: Set up QEMU
2951
if: runner.os == 'Linux'
3052
uses: docker/setup-qemu-action@v3
3153
with:
3254
platforms: all
3355

56+
- name: install windows deps
57+
if: runner.os == 'Windows'
58+
run: >
59+
vcpkg install --triplet x64-windows-static-md --binarysource="clear;x-gha,readwrite"
60+
libxml2
61+
capnproto
62+
boost-program-options
63+
boost-format
64+
boost-algorithm
65+
boost-multi-array
66+
openssl
67+
dlfcn-win32
68+
spdlog
69+
70+
- name: build uda on windows
71+
if: runner.os == 'Windows'
72+
env:
73+
XDR_ROOT: extlib/install
74+
CMAKE_PREFIX_PATH: C:/vcpkg/installed/x64-windows-static-md
75+
Boost_DIR: C:/vcpkg/installed/x64-windows-static-md/share/boost
76+
LibXml2_DIR: C:/vcpkg/installed/x64-windows-static-md/share/libxml2
77+
CapnProto_DIR: C:/vcpkg/installed/x64-windows-static-md/share/capnproto
78+
fmt_DIR: C:/vcpkg/installed/x64-windows-static-md/share/fmt
79+
run: >
80+
cmake -Bextlib/build ./extlib
81+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
82+
-DVCPKG_TARGET_TRIPLET="x64-windows-static-md"
83+
-DVCPKG_HOST_TRIPLET="x64-windows-static-md"
84+
-DCMAKE_GENERATOR_PLATFORM=x64
85+
-DBUILD_SHARED_LIBS=OFF
86+
&& cmake --build extlib/build --config Release
87+
&& cmake --install extlib/build --prefix extlib/install
88+
&& cmake -Bbuild .
89+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
90+
-DVCPKG_TARGET_TRIPLET="x64-windows-static-md"
91+
-DVCPKG_HOST_TRIPLET="x64-windows-static-md"
92+
-DCMAKE_GENERATOR_PLATFORM=x64
93+
-DBUILD_SHARED_LIBS=ON
94+
-DSSLAUTHENTICATION=ON
95+
-DCLIENT_ONLY=ON
96+
-DENABLE_CAPNP=ON
97+
-DNO_JAVA_WRAPPER=ON
98+
-DNO_CXX_WRAPPER=ON
99+
-DNO_IDL_WRAPPER=ON
100+
-DNO_CLI=ON
101+
-DNO_MEMCACHE=ON
102+
-DCMAKE_INSTALL_PREFIX=install
103+
&& cmake --build build -j --config Release
104+
&& cmake --install build --config Release
105+
&& ls install/lib
106+
&& cat install/python_installer/setup.py
107+
108+
- name: build windows wheels
109+
if: runner.OS == 'Windows'
110+
uses: pypa/[email protected]
111+
with:
112+
package-dir: ${{github.workspace}}/install/python_installer
113+
config-file: ${{github.workspace}}/install/python_installer/pyproject.toml
114+
env:
115+
CIBW_ARCHS: ${{matrix.build-platform[1]}}
116+
CIBW_PLATFORM: windows
117+
CIBW_BUILD: cp3*-${{matrix.build-platform[2]}}
118+
CIBW_SKIP: cp36* cp37*
119+
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -w {dest_dir} {wheel} --add-path ${{github.workspace}}/install/lib"
120+
CIBW_BEFORE_BUILD_WINDOWS: "pip install delvewheel"
121+
34122
- name: Build manylinux2014 wheels
35-
if: startswith(matrix.build-platform[2], 'manylinux2014')
123+
# this is a slow-running build. Only execute on tag
124+
if: >
125+
startswith(matrix.build-platform[2], 'manylinux2014') &&
126+
github.event_name == 'push' &&
127+
startsWith(github.ref, 'refs/tags/')
36128
uses: pypa/[email protected]
37129
with:
38130
package-dir: ./source/wrappers/python
@@ -79,7 +171,11 @@ jobs:
79171
cp -r /usr/local/python_installer/* /project/source/wrappers/python/
80172
81173
- name: Build manylinux_2_28 wheels
82-
if: startswith(matrix.build-platform[2], 'manylinux_2_28')
174+
# hardware emulation for ubuntu on arm64 archiecture is much slower. Do not run that case except for push to tag.
175+
if: >
176+
startswith(matrix.build-platform[2], 'manylinux_2_28') &&
177+
! ( startswith(matrix.build-platform[1], 'aarch64') &&
178+
!startsWith(github.ref, 'refs/tags/') )
83179
uses: pypa/[email protected]
84180
with:
85181
package-dir: ./source/wrappers/python
@@ -145,6 +241,8 @@ jobs:
145241
path: ./wheelhouse/*.whl
146242

147243
upload_pypi:
244+
# only upload to pypi for tagged releases
245+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
148246
needs: build_wheels
149247
runs-on: ubuntu-latest
150248
environment:
@@ -161,3 +259,26 @@ jobs:
161259
merge-multiple: true
162260

163261
- uses: pypa/gh-action-pypi-publish@release/v1
262+
263+
upload_test_pypi:
264+
# push test wheels to testpypi for all intermediate release candidates (release/*, develop, etc.)
265+
# but never for feature branches
266+
if: >
267+
github.event_name == 'push' && !startsWith(github.ref, 'refs/heads/feature/')
268+
needs: build_wheels
269+
runs-on: ubuntu-latest
270+
environment:
271+
name: testpypi
272+
permissions:
273+
id-token: write
274+
steps:
275+
- uses: actions/download-artifact@v4
276+
with:
277+
# unpacks all CIBW artifacts into dist/
278+
pattern: cibw-*
279+
path: dist
280+
merge-multiple: true
281+
282+
- uses: pypa/gh-action-pypi-publish@release/v1
283+
with:
284+
repository-url: https://test.pypi.org/legacy/

.github/workflows/cmake.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,18 @@ jobs:
1818
build:
1919
strategy:
2020
matrix:
21-
# os: [ubuntu-latest, windows-latest, macos-latest]
22-
os: [ubuntu-latest, macos-latest]
21+
os: [ubuntu-latest, windows-latest, macos-latest]
2322
release: [Release]
2423
ssl: [ON, OFF]
25-
client-only: [OFF]
24+
client-only: [ON, OFF]
2625
capnp: [ON, OFF]
27-
# include:
28-
# - client-only: ON
29-
# ssl: OFF
30-
# - client-only: OFF
31-
# ssl: OFF
26+
exclude:
27+
- os: windows-latest
28+
client-only: OFF
29+
- os: ubuntu-latest
30+
client-only: ON
31+
- os: macos-latest
32+
client-only: ON
3233

3334
runs-on: ${{ matrix.os }}
3435

@@ -39,7 +40,7 @@ jobs:
3940
steps:
4041
- uses: actions/checkout@v3
4142

42-
- uses: actions/github-script@v6
43+
- uses: actions/github-script@v7
4344
with:
4445
script: |
4546
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
@@ -169,6 +170,7 @@ jobs:
169170
-DSSLAUTHENTICATION=${{ matrix.ssl }}
170171
-DCLIENT_ONLY=${{ matrix.client-only }}
171172
-DENABLE_CAPNP=${{ matrix.capnp }}
173+
-DCMAKE_INSTALL_PREFIX=${{github.workspace}}/uda_install
172174
173175
- name: Build
174176
run: cmake --build build --config ${{ matrix.release }}

0 commit comments

Comments
 (0)