Skip to content

Commit 0122528

Browse files
authored
Upgrade to support newer Python builds (#2)
- Switch to newer linux images for muslinux and manylinux - Bump version of zlib for windows builds - Add arm64 builds for macos - build everything through actions
1 parent 402271b commit 0122528

6 files changed

+29
-15
lines changed

.github/workflows/build-libraries.yaml

+23-9
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,40 @@ name: Build libraries
33
on:
44
create:
55
tags:
6-
- '*-x86_64'
6+
- '*'
7+
pull_request:
78

89
jobs:
9-
build_macosx_x86_64:
10-
name: Build MacOSX (x86_64)
11-
runs-on: macOS-11
10+
build_macosx:
11+
name: Build wheels on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
# macos-13 is an intel runner, higher macos's are apple silicon
16+
# At some point, maybe get this to work on windows-latest
17+
os: [macos-13, macos-latest]
1218

1319
steps:
1420
- name: Checkout
15-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
1622

1723
- name: Set up CMake
1824
uses: lukka/get-cmake@latest
1925

2026
- name: Run the build
27+
if: matrix.os == 'macos-13'
2128
run: |
2229
git config --global --add safe.directory $(pwd)
2330
./build_macosx.sh "x86_64"
2431
tar -czf macosx_x86_64.tar.gz installed/
2532
33+
- name: Run the build
34+
if: matrix.os == 'macos-latest'
35+
run: |
36+
git config --global --add safe.directory $(pwd)
37+
./build_macosx.sh "arm64"
38+
tar -czf macosx_arm64.tar.gz installed/
39+
2640
- name: Upload tarballs
2741
uses: actions/upload-artifact@v3
2842
with:
@@ -34,7 +48,7 @@ jobs:
3448

3549
steps:
3650
- name: Checkout
37-
uses: actions/checkout@v3
51+
uses: actions/checkout@v4
3852

3953
- name: Run the build
4054
run: |
@@ -50,12 +64,12 @@ jobs:
5064

5165
publish:
5266
name: Publish libraries
53-
needs: [build_macosx_x86_64, build_windows_x86_64]
67+
needs: [build_macosx, build_windows_x86_64]
5468
if: startsWith(github.ref, 'refs/tags/')
5569
runs-on: ubuntu-latest
5670

5771
steps:
58-
- name: Download macosx (x86_64) artifact
72+
- name: Download macosx artifact
5973
uses: actions/download-artifact@v3
6074
with:
6175
path: dump
@@ -67,5 +81,5 @@ jobs:
6781
- name: Publish release
6882
uses: softprops/action-gh-release@v1
6983
with:
70-
name: "HDF5 binaries (x86_64)"
84+
name: "HDF5 binaries"
7185
files: dump/*/*

.github/workflows/create-docker.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
on:
22
create:
33
tags:
4-
- '*-x86_64'
4+
- '*'
55

66
name: Create Docker images
77

build_macosx.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -u
55

66
arch=${1}
77

8-
mkdir installed
8+
mkdir -p installed
99
install_dir=$(pwd)/installed
1010

1111
common="-DCMAKE_OSX_ARCHITECTURES=${arch} -DCMAKE_INSTALL_PREFIX=${install_dir}"

build_windows.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ mkdir installed
77
install_dir=$(pwd)/installed
88

99
# Setting up ZLIB
10-
curl https://www.zlib.net/zlib-1.3.tar.gz > bundle.tar.gz
10+
curl https://www.zlib.net/zlib-1.3.1.tar.gz > bundle.tar.gz
1111
tar -xf bundle.tar.gz
1212
rm bundle.tar.gz
13-
mv zlib-1.3 libz
13+
mv zlib-1.3.1 libz
1414

1515
cd libz
1616
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=${install_dir}

manylinux_x86_64.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/pypa/manylinux2014_x86_64
1+
FROM quay.io/pypa/manylinux_2_34
22
WORKDIR /home/root
33
COPY setup* .
44
COPY build_linux.sh .

musllinux_x86_64.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/pypa/musllinux_1_1_x86_64
1+
FROM quay.io/pypa/musllinux_1_2
22
WORKDIR /home/root
33
COPY setup* .
44
COPY build_linux.sh .

0 commit comments

Comments
 (0)