|
11 | 11 | runs-on: ${{ matrix.os }} |
12 | 12 | strategy: |
13 | 13 | matrix: |
14 | | - os: [ubuntu-latest, macos-latest, windows-latest] |
| 14 | + os: [ubuntu-latest, macos-13, macos-14, windows-latest] |
15 | 15 |
|
16 | 16 | steps: |
17 | 17 | - uses: actions/checkout@v4 |
@@ -45,29 +45,22 @@ jobs: |
45 | 45 | shell: bash |
46 | 46 | run: | |
47 | 47 | 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" |
55 | 54 | elif [[ "${{ runner.os }}" == "Linux" ]]; then |
56 | 55 | RID="linux-x64"; TARGET="x86_64-unknown-linux-gnu"; |
| 56 | + LIB="ThermoNativeReader.so" |
57 | 57 | else |
58 | 58 | RID="win-x64"; TARGET="x86_64-pc-windows-msvc"; |
| 59 | + LIB="ThermoNativeReader.dll" |
59 | 60 | fi |
60 | 61 | |
61 | 62 | dotnet publish -r $RID -c Release -p:PublishAot=true |
62 | 63 | |
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 |
71 | 64 | cp bin/Release/net8.0/$RID/publish/$LIB ../../native_fisher_py/python/native_fisher_py/ |
72 | 65 | |
73 | 66 | echo "TARGET=$TARGET" >> $GITHUB_ENV |
|
87 | 80 | - name: Upload wheels |
88 | 81 | uses: actions/upload-artifact@v4 |
89 | 82 | with: |
90 | | - name: wheels-${{ runner.os }} |
| 83 | + name: wheels-${{ matrix.os }} |
91 | 84 | path: dist/*.whl |
92 | 85 |
|
93 | 86 | publish: |
|
106 | 99 | - name: Publish to PyPI |
107 | 100 | uses: pypa/gh-action-pypi-publish@release/v1 |
108 | 101 | with: |
109 | | - # Using Trusted Publishing instead of passwords is recommended |
110 | | - # Set up a Trusted Publisher on PyPI targeting your repository |
111 | 102 | print-hash: true |
0 commit comments