Skip to content

Commit

Permalink
add macOS x86 dylib
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Vitula <marek.vitula@nxp.com>
  • Loading branch information
marekvi95 committed Dec 18, 2024
1 parent 04ba4a7 commit 9f3b4b2
Showing 1 changed file with 50 additions and 5 deletions.
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

0 comments on commit 9f3b4b2

Please sign in to comment.