-
Notifications
You must be signed in to change notification settings - Fork 198
51 lines (49 loc) · 1.71 KB
/
mac-univ.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
on:
workflow_call:
inputs:
artifact_x64:
description: Artifact containing the x64 version
type: string
required: true
artifact_arm64:
description: Artifact containing the arm64 version
type: string
required: true
outputs:
artifact:
description: "The name of the artifact"
value: ${{ jobs.build.outputs.artifact }}
jobs:
build:
runs-on: macos-latest
outputs:
artifact: ${{ steps.init.outputs.artifact }}
steps:
- name: Initialize
id: init
run: |
echo "artifact=${{inputs.artifact_x64}}" | sed "s/x64/univ/g" >> $GITHUB_OUTPUT
- name: Download ${{ inputs.artifact_x64 }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_x64 }}
path: ${{ inputs.artifact_x64 }}
- name: Download ${{ inputs.artifact_arm64 }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_arm64 }}
path: ${{ inputs.artifact_arm64 }}
- name: Create universal library
run: |
cp -r ${{ inputs.artifact_arm64 }} ${{ steps.init.outputs.artifact }}
sed -i '' '/target_cpu/d' ${{ steps.init.outputs.artifact }}/args.gn
rm ${{ steps.init.outputs.artifact }}/lib/libpdfium.dylib
lipo -create \
${{ inputs.artifact_arm64 }}/lib/libpdfium.dylib \
${{ inputs.artifact_x64 }}/lib/libpdfium.dylib \
-output ${{ steps.init.outputs.artifact }}/lib/libpdfium.dylib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.init.outputs.artifact }}
path: ${{ steps.init.outputs.artifact }}