ci: build macOS wheels for deltachat-rpc-server

This commit is contained in:
link2xt
2023-10-23 16:11:18 +00:00
parent cff42936aa
commit b73bcc2c22
2 changed files with 31 additions and 14 deletions

View File

@@ -26,25 +26,16 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
# Python 3.11 is needed for tomllib used in scripts/wheel-rpc-server.py - name: Install ziglang
- name: Install python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install ziglang and wheel
run: pip install wheel ziglang==0.11.0 run: pip install wheel ziglang==0.11.0
- name: Build deltachat-rpc-server binaries - name: Build deltachat-rpc-server binaries
run: sh scripts/zig-rpc-server.sh run: sh scripts/zig-rpc-server.sh
- name: Build deltachat-rpc-server Python wheels and source package - name: Upload dist directory with Linux binaries
run: scripts/wheel-rpc-server.py
- name: Upload dist directory
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: dist name: linux
path: dist/ path: dist/
if-no-files-found: error if-no-files-found: error
@@ -108,16 +99,18 @@ jobs:
if-no-files-found: error if-no-files-found: error
publish: publish:
name: Upload binaries to the release name: Build wheels and upload binaries to the release
needs: ["build_linux", "build_windows", "build_macos"] needs: ["build_linux", "build_windows", "build_macos"]
permissions: permissions:
contents: write contents: write
runs-on: "ubuntu-latest" runs-on: "ubuntu-latest"
steps: steps:
- uses: actions/checkout@v3
- name: Download Linux binaries - name: Download Linux binaries
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: dist name: linux
path: dist/ path: dist/
- name: Download win32 binary - name: Download win32 binary
@@ -151,6 +144,18 @@ jobs:
mv deltachat-rpc-server-x86_64-macos.d/deltachat-rpc-server dist/deltachat-rpc-server-x86_64-macos mv deltachat-rpc-server-x86_64-macos.d/deltachat-rpc-server dist/deltachat-rpc-server-x86_64-macos
mv deltachat-rpc-server-aarch64-macos.d/deltachat-rpc-server dist/deltachat-rpc-server-aarch64-macos mv deltachat-rpc-server-aarch64-macos.d/deltachat-rpc-server dist/deltachat-rpc-server-aarch64-macos
# Python 3.11 is needed for tomllib used in scripts/wheel-rpc-server.py
- name: Install python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install wheel
run: pip install wheel
- name: Build deltachat-rpc-server Python wheels and source package
run: scripts/wheel-rpc-server.py
- name: List downloaded artifacts - name: List downloaded artifacts
run: ls -l dist/ run: ls -l dist/

View File

@@ -158,5 +158,17 @@ def main():
"py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686", "py3-none-manylinux_2_12_i686.manylinux2010_i686.musllinux_1_1_i686",
) )
# macOS versions for platform compatibility tags are taken from https://doc.rust-lang.org/rustc/platform-support.html
build_wheel(
version,
"dist/deltachat-rpc-server-x86_64-macos",
"py3-none-macosx_10_7_x86_64",
)
build_wheel(
version,
"dist/deltachat-rpc-server-aarch64-macos",
"py3-none-macosx_11_0_arm64",
)
main() main()