@@ -22,20 +22,37 @@ permissions:
2222jobs :
2323 # ── iOS XCFramework ────────────────────────────────────────────────────────
2424 ios :
25- name : iOS XCFramework (${{ matrix.platform }})
25+ name : iOS XCFramework (${{ matrix.platform }}, ${{ matrix.target }} )
2626 runs-on : macos-15
2727 strategy :
2828 matrix :
2929 include :
30+ # test_stub slices
3031 - platform : OS64
3132 sysroot : iphoneos
3233 label : device-arm64
34+ target : ferrum_test_stub
3335 - platform : SIMULATORARM64
3436 sysroot : iphonesimulator
3537 label : sim-arm64
38+ target : ferrum_test_stub
3639 - platform : SIMULATOR64
3740 sysroot : iphonesimulator
3841 label : sim-x86_64
42+ target : ferrum_test_stub
43+ # dsp_fixture slices
44+ - platform : OS64
45+ sysroot : iphoneos
46+ label : dsp-device-arm64
47+ target : ferrum_dsp_fixture
48+ - platform : SIMULATORARM64
49+ sysroot : iphonesimulator
50+ label : dsp-sim-arm64
51+ target : ferrum_dsp_fixture
52+ - platform : SIMULATOR64
53+ sysroot : iphonesimulator
54+ label : dsp-sim-x86_64
55+ target : ferrum_dsp_fixture
3956
4057 steps :
4158 - uses : actions/checkout@v4
@@ -57,65 +74,78 @@ jobs:
5774 run : |
5875 cmake --build .build/ios/${{ matrix.label }} \
5976 --config Release \
60- --target ferrum_test_stub
77+ --target ${{ matrix.target }}
6178
6279 - name : Upload slice artifact
6380 uses : actions/upload-artifact@v4
6481 with :
6582 name : ios-${{ matrix.label }}
66- path : .build/ios/${{ matrix.label }}/Release-${{ matrix.sysroot }}/libferrum_test_stub .a
83+ path : .build/ios/${{ matrix.label }}/Release-${{ matrix.sysroot }}/lib${{ matrix.target }} .a
6784
68- # Assemble the full XCFramework from the three slices
85+ # Assemble the full XCFramework from the three slices (per target)
6986 ios-xcframework :
70- name : Assemble XCFramework
87+ name : Assemble XCFramework (${{ matrix.target }})
7188 runs-on : macos-15
7289 needs : ios
90+ strategy :
91+ matrix :
92+ include :
93+ - target : ferrum_test_stub
94+ device_label : device-arm64
95+ sim_arm64_label : sim-arm64
96+ sim_x86_label : sim-x86_64
97+ - target : ferrum_dsp_fixture
98+ device_label : dsp-device-arm64
99+ sim_arm64_label : dsp-sim-arm64
100+ sim_x86_label : dsp-sim-x86_64
73101 steps :
74102 - uses : actions/checkout@v4
75103
76104 - uses : actions/download-artifact@v4
77105 with :
78- name : ios-device-arm64
79- path : .slices/device
106+ name : ios-${{ matrix.device_label }}
107+ path : .slices/${{ matrix.target }}/ device
80108
81109 - uses : actions/download-artifact@v4
82110 with :
83- name : ios-sim-arm64
84- path : .slices/sim-arm64
111+ name : ios-${{ matrix.sim_arm64_label }}
112+ path : .slices/${{ matrix.target }}/ sim-arm64
85113
86114 - uses : actions/download-artifact@v4
87115 with :
88- name : ios-sim-x86_64
89- path : .slices/sim-x86_64
116+ name : ios-${{ matrix.sim_x86_label }}
117+ path : .slices/${{ matrix.target }}/ sim-x86_64
90118
91119 - name : Create fat simulator library
92120 run : |
121+ mkdir -p .slices/${{ matrix.target }}/sim-fat
93122 lipo -create \
94- .slices/sim-arm64/libferrum_test_stub .a \
95- .slices/sim-x86_64/libferrum_test_stub .a \
96- -output .slices/sim-fat/libferrum_test_stub .a
123+ .slices/${{ matrix.target }}/ sim-arm64/lib${{ matrix.target }} .a \
124+ .slices/${{ matrix.target }}/ sim-x86_64/lib${{ matrix.target }} .a \
125+ -output .slices/${{ matrix.target }}/ sim-fat/lib${{ matrix.target }} .a
97126
98127 - name : Create XCFramework
99128 run : |
100129 mkdir -p artifacts/ios
101130 xcodebuild -create-xcframework \
102- -library .slices/device/libferrum_test_stub .a \
103- -library .slices/sim-fat/libferrum_test_stub .a \
104- -output artifacts/ios/libferrum_test_stub .xcframework
131+ -library .slices/${{ matrix.target }}/ device/lib${{ matrix.target }} .a \
132+ -library .slices/${{ matrix.target }}/ sim-fat/lib${{ matrix.target }} .a \
133+ -output artifacts/ios/lib${{ matrix.target }} .xcframework
105134
106135 - name : Upload XCFramework
107136 uses : actions/upload-artifact@v4
108137 with :
109- name : ios-xcframework
110- path : artifacts/ios/libferrum_test_stub .xcframework
138+ name : ios-xcframework-${{ matrix.target }}
139+ path : artifacts/ios/lib${{ matrix.target }} .xcframework
111140
112141 # ── Android .so per ABI ────────────────────────────────────────────────────
113142 android :
114- name : Android (${{ matrix.abi }})
143+ name : Android (${{ matrix.abi }}, ${{ matrix.target }} )
115144 runs-on : ubuntu-24.04
116145 strategy :
117146 matrix :
118147 abi : [arm64-v8a, armeabi-v7a, x86_64, x86]
148+ target : [ferrum_test_stub, ferrum_dsp_fixture]
119149
120150 steps :
121151 - uses : actions/checkout@v4
@@ -130,20 +160,20 @@ jobs:
130160 run : |
131161 NDK_ROOT="${ANDROID_SDK_ROOT}/ndk/27.2.12479018"
132162 cmake -S native \
133- -B .build/android/${{ matrix.abi }} \
163+ -B .build/android/${{ matrix.abi }}-${{ matrix.target }} \
134164 -DCMAKE_TOOLCHAIN_FILE="${NDK_ROOT}/build/cmake/android.toolchain.cmake" \
135165 -DANDROID_ABI=${{ matrix.abi }} \
136166 -DANDROID_PLATFORM=android-24 \
137167 -DCMAKE_BUILD_TYPE=Release
138168
139169 - name : Build
140170 run : |
141- cmake --build .build/android/${{ matrix.abi }} \
171+ cmake --build .build/android/${{ matrix.abi }}-${{ matrix.target }} \
142172 --config Release \
143- --target ferrum_test_stub
173+ --target ${{ matrix.target }}
144174
145175 - name : Upload .so artifact
146176 uses : actions/upload-artifact@v4
147177 with :
148- name : android-${{ matrix.abi }}
149- path : .build/android/${{ matrix.abi }}/libferrum_test_stub .so
178+ name : android-${{ matrix.abi }}-${{ matrix.target }}
179+ path : .build/android/${{ matrix.abi }}-${{ matrix.target }}/lib${{ matrix.target }} .so
0 commit comments