Skip to content

Commit 4971b97

Browse files
committed
Support more architectures
1 parent dacf12c commit 4971b97

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
os: [ubuntu-latest, macos-latest, windows-latest]
14+
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -45,29 +45,22 @@ jobs:
4545
shell: bash
4646
run: |
4747
cd native/ThermoNativeReader
48-
if [[ "${{ runner.os }}" == "macOS" ]]; then
49-
ARCH=$(uname -m)
50-
if [[ "$ARCH" == "arm64" ]]; then
51-
RID="osx-arm64"; TARGET="aarch64-apple-darwin";
52-
else
53-
RID="osx-x64"; TARGET="x86_64-apple-darwin";
54-
fi
48+
if [[ "${{ matrix.os }}" == "macos-14" ]]; then
49+
RID="osx-arm64"; TARGET="aarch64-apple-darwin";
50+
LIB="ThermoNativeReader.dylib"
51+
elif [[ "${{ matrix.os }}" == "macos-13" ]]; then
52+
RID="osx-x64"; TARGET="x86_64-apple-darwin";
53+
LIB="ThermoNativeReader.dylib"
5554
elif [[ "${{ runner.os }}" == "Linux" ]]; then
5655
RID="linux-x64"; TARGET="x86_64-unknown-linux-gnu";
56+
LIB="ThermoNativeReader.so"
5757
else
5858
RID="win-x64"; TARGET="x86_64-pc-windows-msvc";
59+
LIB="ThermoNativeReader.dll"
5960
fi
6061
6162
dotnet publish -r $RID -c Release -p:PublishAot=true
6263
63-
# Copy native lib to package for release bundling
64-
if [[ "${{ runner.os }}" == "macOS" ]]; then
65-
LIB="ThermoNativeReader.dylib"
66-
elif [[ "${{ runner.os }}" == "Linux" ]]; then
67-
LIB="ThermoNativeReader.so"
68-
else
69-
LIB="ThermoNativeReader.dll"
70-
fi
7164
cp bin/Release/net8.0/$RID/publish/$LIB ../../native_fisher_py/python/native_fisher_py/
7265
7366
echo "TARGET=$TARGET" >> $GITHUB_ENV
@@ -87,7 +80,7 @@ jobs:
8780
- name: Upload wheels
8881
uses: actions/upload-artifact@v4
8982
with:
90-
name: wheels-${{ runner.os }}
83+
name: wheels-${{ matrix.os }}
9184
path: dist/*.whl
9285

9386
publish:
@@ -106,6 +99,4 @@ jobs:
10699
- name: Publish to PyPI
107100
uses: pypa/gh-action-pypi-publish@release/v1
108101
with:
109-
# Using Trusted Publishing instead of passwords is recommended
110-
# Set up a Trusted Publisher on PyPI targeting your repository
111102
print-hash: true

native_fisher_py/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ name = "native_fisher_py_backend"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
pyo3 = "0.27.0"
12+
pyo3 = { version = "0.27.0", features = ["abi3-py39"] }
1313
libloading = "0.8"

0 commit comments

Comments
 (0)