Skip to content

Commit

Permalink
add macOS x86 dylib
Browse files Browse the repository at this point in the history
  • Loading branch information
marekvi95 committed Oct 7, 2024
1 parent 18656db commit befe0c6
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 6 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
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# uuu (Universal Update Utility), mfgtools 3.0


[![macOS Build](https://github.com/nxp-imx/mfgtools/actions/workflows/macOS.yaml/badge.svg?branch=master)](https://github.com/nxp-imx/mfgtools/actions/workflows/macOS.yaml)
[![Build with VS Studio](https://github.com/nxp-imx/mfgtools/actions/workflows/win.yaml/badge.svg)](https://github.com/nxp-imx/mfgtools/actions/workflows/win.yaml)
[![Build for x64 ubuntu-lastest](https://github.com/nxp-imx/mfgtools/actions/workflows/build.yaml/badge.svg)](https://github.com/nxp-imx/mfgtools/actions/workflows/build.yaml)
Expand Down

0 comments on commit befe0c6

Please sign in to comment.