Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add x86 mac dylib #437

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 50 additions & 5 deletions .github/workflows/build_wrapper.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
name: Multiplatform build of libuuu wrapper python package
on:
push:
branches: [master]
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize

jobs:
build-dlls:
Expand All @@ -10,6 +17,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
arch: [x86_64, arm64]
exclude:
- os: windows-latest
arch: arm64
- os: ubuntu-latest
arch: arm64

steps:
- name: Checkout uuu repository
Expand Down Expand Up @@ -56,7 +69,11 @@ jobs:
if: matrix.os != 'windows-latest'
run: |
export PATH=$VCPKG_ROOT:$PATH
cmake --preset=unix
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
cmake --preset=unix;
else
cmake --preset=unix -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }};
fi
cmake --build build

- name: Build on Windows
Expand All @@ -78,19 +95,47 @@ jobs:
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v4
with:
name: libuuu-macos
name: pre-libuuu-macos-${{ matrix.arch }}
path: ./wrapper/build/libuuu.dylib

- name: Upload artifacts Ubuntu
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v4
with:
name: libuuu-ubuntu
name: libuuu-ubuntu-${{ matrix.arch }}
path: ./wrapper/build/libuuu.so

create-universal-dylib:
runs-on: macos-latest
needs: build-dlls
steps:
- name: Download x86_64 artifacts
uses: actions/download-artifact@v4
with:
name: pre-libuuu-macos-x86_64
path: ./x86_64
- name: Download arm64 artifacts
uses: actions/download-artifact@v4
with:
name: pre-libuuu-macos-arm64
path: ./arm64

- name: Create build directory
run: mkdir -p ./wrapper/build

- name: Create universal dylib
run: |
lipo -create -output ./wrapper/build/libuuu.dylib ./x86_64/libuuu.dylib ./arm64/libuuu.dylib

- name: Upload universal dylib
uses: actions/upload-artifact@v4
with:
name: libuuu-macos-universal
path: ./wrapper/build/libuuu.dylib

build-libuuu-wrapper:
runs-on: ubuntu-latest
needs: build-dlls
needs: create-universal-dylib
steps:
- name: Checkout uuu repository
uses: actions/checkout@v3
Expand Down
Loading