Skip to content

Commit

Permalink
ci: fix windows, android, linux, macos, ios, and tvos builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jsm174 committed Mar 8, 2024
1 parent 41efae4 commit 6ceb0af
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 87 deletions.
69 changes: 29 additions & 40 deletions .github/workflows/libdmdutil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- if: (matrix.os == 'macos-latest')
name: Add autoconf and automake (mac runner)
run: |
brew install autoconf automake coreutils
brew install autoconf automake
- if: (!(matrix.platform == 'linux' && matrix.arch == 'aarch64'))
name: Build libdmdutil-${{ matrix.platform }}-${{ matrix.arch }}
run: |
Expand Down Expand Up @@ -117,24 +117,14 @@ jobs:
if [[ "${{ matrix.platform }}" == "win" ]]; then
ARTIFACT_PATH="tmp"
if [[ "${{ matrix.arch }}" == "x64" ]]; then
cp build/Release/dmdutil64.lib tmp
cp build/Release/dmdutil64.dll tmp
cp build/Release/zedmd64.lib tmp
cp build/Release/zedmd64.dll tmp
cp build/Release/serum64.lib tmp
cp build/Release/serum64.dll tmp
cp build/Release/libserialport64.lib tmp
cp build/Release/libserialport64.dll tmp
cp build/Release/*64.lib tmp
cp build/Release/*64.dll tmp
else
cp build/Release/dmdutil.lib tmp
cp build/Release/dmdutil.dll tmp
cp build/Release/zedmd.lib tmp
cp build/Release/zedmd.dll tmp
cp build/Release/serum.lib tmp
cp build/Release/serum.dll tmp
cp build/Release/libserialport.lib tmp
cp build/Release/libserialport.dll tmp
cp build/Release/*.lib tmp
cp build/Release/*.dll tmp
fi
cp build/Release/dmdserver.exe tmp
cp build/Release/dmdserver_test.exe tmp
cp build/Release/dmdutil_static.lib tmp
cp build/Release/dmdutil_test_s.exe tmp
cp build/Release/dmdutil_test.exe tmp
Expand All @@ -143,22 +133,26 @@ jobs:
ARTIFACT_PATH="libdmdutil-${{ needs.version.outputs.tag }}-${{ matrix.platform }}-${{ matrix.arch }}.tar.gz"
if [[ "${{ matrix.platform }}" == "macos" ]]; then
cp build/libdmdutil.a tmp
cp -P build/*.dylib tmp
cp -a build/*.dylib tmp
cp build/dmdserver tmp
cp build/dmdserver_test tmp
cp build/dmdutil_test_s tmp
cp build/dmdutil_test tmp
elif [[ "${{ matrix.platform }}" == "linux" ]]; then
cp build/libdmdutil.a tmp
cp -P build/*.{so,so.*} tmp
cp -a build/*.{so,so.*} tmp
cp build/dmdserver tmp
cp build/dmdserver_test tmp
cp build/dmdutil_test_s tmp
cp build/dmdutil_test tmp
elif [[ "${{ matrix.platform }}" == "ios" || "${{ matrix.platform }}" == "tvos" ]]; then
cp build/libdmdutil.a tmp
cp -P build/*.dylib tmp
cp -a build/*.dylib tmp
elif [[ "${{ matrix.platform }}" == "android" ]]; then
cp build/libdmdutil.a tmp
cp build/libdmdutil.so tmp
fi
cp -r test tmp/
cp -r test tmp/
cd tmp
tar -czvf ../${ARTIFACT_PATH} *
fi
Expand All @@ -185,25 +179,20 @@ jobs:
- name: Combine macos architectures
run: |
mkdir tmp
cp -r libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/test tmp/
lipo -create -output tmp/libdmdutil-${{ needs.version.outputs.tag }}.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/libdmdutil.${{ needs.version.outputs.tag }}.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/libdmdutil.${{ needs.version.outputs.tag }}.dylib
lipo -create -output tmp/libzedmd.0.6.0.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/libzedmd.0.6.0.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/libzedmd.0.6.0.dylib
lipo -create -output tmp/libserum.1.6.2.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/libserum.1.6.2.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/libserum.1.6.2.dylib
lipo -create -output tmp/libserialport.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/libserialport.dylib \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/libserialport.dylib
lipo -create -output tmp/dmdutil_test \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/dmdutil_test \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/dmdutil_test
lipo -create -output tmp/dmdutil_test_s \
libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/dmdutil_test_s \
libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/dmdutil_test_s
find "libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64" -name "*.dylib" | while read -r file; do
if [ ! -L "$file" ]; then
filename=$(basename "$file")
lipo -create -output "tmp/$filename" \
"libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/$filename" \
"libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/$filename"
fi
done
for filename in dmdserver dmdserver_test dmdutil_test_s dmdutil_test; do
lipo -create -output "tmp/$filename" \
"libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/$filename" \
"libdmdutil-${{ needs.version.outputs.tag }}-macos-x64/$filename"
done
cp -r libdmdutil-${{ needs.version.outputs.tag }}-macos-arm64/test tmp
- name: Prepare artifacts
run: |
cd tmp
Expand Down
24 changes: 15 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if(BUILD_SHARED)
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
if(ARCH STREQUAL "x64")
target_link_libraries(dmdutil_shared PUBLIC zedmd64 serum64 libserialport64 sockpp ws2_32)
target_link_libraries(dmdutil_shared PUBLIC zedmd64 serum64 libserialport64 sockpp64 ws2_32)
else()
target_link_libraries(dmdutil_shared PUBLIC zedmd serum libserialport sockpp ws2_32)
endif()
Expand Down Expand Up @@ -164,7 +164,8 @@ if(BUILD_SHARED)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/serum64.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport64.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp64.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp64.dll" "$<TARGET_FILE_DIR:dmdserver>"
)
else()
add_custom_command(TARGET dmdserver POST_BUILD
Expand All @@ -174,17 +175,18 @@ if(BUILD_SHARED)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/serum.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport.dll" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp.lib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdserver>"
)
endif()
elseif(PLATFORM STREQUAL "macos")
add_custom_command(TARGET dmdserver POST_BUILD
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.dylib" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.dylib" "$<TARGET_FILE_DIR:dmdserver>"
)
elseif(PLATFORM STREQUAL "linux")
add_custom_command(TARGET dmdserver POST_BUILD
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so.*" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so" "$<TARGET_FILE_DIR:dmdserver>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so.*" "$<TARGET_FILE_DIR:dmdserver>"
)
endif()
endif()
Expand Down Expand Up @@ -222,7 +224,7 @@ if(BUILD_STATIC)
third-party/runtime-libs/${PLATFORM}/${ARCH}
)
if(ARCH STREQUAL "x64")
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static zedmd64 serum64 libserialport64 sockpp ws2_32)
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static zedmd64 serum64 libserialport64 sockpp64 ws2_32)
else()
target_link_libraries(dmdutil_test_s PUBLIC dmdutil_static zedmd serum libserialport sockpp ws2_32)
endif()
Expand All @@ -248,6 +250,8 @@ if(BUILD_STATIC)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/serum64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport64.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp64.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp64.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
else()
add_custom_command(TARGET dmdutil_test_s POST_BUILD
Expand All @@ -257,16 +261,18 @@ if(BUILD_STATIC)
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/serum.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/libserialport.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/libserialport.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/build-libs/${PLATFORM}/${ARCH}/sockpp.lib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/sockpp.dll" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
endif()
elseif(PLATFORM STREQUAL "macos")
add_custom_command(TARGET dmdutil_test_s POST_BUILD
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.dylib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.dylib" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
else()
add_custom_command(TARGET dmdutil_test_s POST_BUILD
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND cp -P "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so.*" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so" "$<TARGET_FILE_DIR:dmdutil_test_s>"
COMMAND cp -a "${CMAKE_SOURCE_DIR}/third-party/runtime-libs/${PLATFORM}/${ARCH}/*.so.*" "$<TARGET_FILE_DIR:dmdutil_test_s>"
)
endif()
endif()
Expand Down
4 changes: 1 addition & 3 deletions platforms/android/arm64-v8a/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ else
NUM_PROCS=1
fi

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down Expand Up @@ -69,7 +67,7 @@ cd ..
curl -sL https://github.com/fpagliughi/sockpp/archive/${LIBSOCKPP_SHA}.zip -o sockpp.zip
unzip sockpp.zip
cd sockpp-$LIBSOCKPP_SHA
patch -p1 < $SCRIPT_DIR/sockpp/001.patch
patch -p1 < ../../platforms/android/arm64-v8a/sockpp/001.patch
cp -r include/sockpp ../../third-party/include/
cmake -DSOCKPP_BUILD_SHARED=ON \
-DSOCKPP_BUILD_STATIC=OFF \
Expand Down
2 changes: 0 additions & 2 deletions platforms/ios/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIBSOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(sysctl -n hw.ncpu)

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down
10 changes: 4 additions & 6 deletions platforms/linux/aarch64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIBSOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(nproc)

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down Expand Up @@ -41,8 +39,8 @@ cmake -DPLATFORM=linux -DARCH=aarch64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMA
cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include/
ln -s $(ls -v third-party/runtime-libs/linux/aarch64/libserialport.so.* | tail -n 1 | xargs basename) third-party/runtime-libs/linux/aarch64/libserialport.so
cp -P third-party/runtime-libs/linux/aarch64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -P build/libzedmd.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -a third-party/runtime-libs/linux/aarch64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -a build/libzedmd.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -r test ../../
cd ..

Expand All @@ -56,7 +54,7 @@ cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=aarch64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -a build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..

#
Expand All @@ -69,5 +67,5 @@ cd sockpp-$LIBSOCKPP_SHA
cp -r include/sockpp ../../third-party/include/
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/aarch64/
cd ..
10 changes: 4 additions & 6 deletions platforms/linux/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIBSOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(nproc)

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down Expand Up @@ -41,8 +39,8 @@ cmake -DPLATFORM=linux -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_B
cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include/
ln -s $(ls -v third-party/runtime-libs/linux/x64/libserialport.so.* | tail -n 1 | xargs basename) third-party/runtime-libs/linux/x64/libserialport.so
cp -P third-party/runtime-libs/linux/x64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -P build/libzedmd.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -a third-party/runtime-libs/linux/x64/libserialport.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -a build/libzedmd.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -r test ../../
cd ..

Expand All @@ -56,7 +54,7 @@ cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=linux -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -a build/libserum.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..

#
Expand All @@ -69,5 +67,5 @@ cd sockpp-$LIBSOCKPP_SHA
cp -r include/sockpp ../../third-party/include/
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cp -a build/libsockpp.{so,so.*} ../../third-party/runtime-libs/linux/x64/
cd ..
10 changes: 4 additions & 6 deletions platforms/macos/arm64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIBSOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(sysctl -n hw.ncpu)

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down Expand Up @@ -40,8 +38,8 @@ platforms/macos/arm64/external.sh
cmake -DPLATFORM=macos -DARCH=arm64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include/
cp -P third-party/runtime-libs/macos/arm64/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -P build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -a third-party/runtime-libs/macos/arm64/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -r test ../../
cd ..

Expand All @@ -55,7 +53,7 @@ cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=macos -DARCH=arm64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cd ..

#
Expand All @@ -73,5 +71,5 @@ cmake -DSOCKPP_BUILD_SHARED=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/arm64/
cd ..
10 changes: 4 additions & 6 deletions platforms/macos/x64/external.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ LIBSOCKPP_SHA=e6c4688a576d95f42dd7628cefe68092f6c5cd0f

NUM_PROCS=$(sysctl -n hw.ncpu)

SCRIPT_DIR=$(realpath "$(dirname "$0")")

echo "Building libraries..."
echo " LIBZEDMD_SHA: ${LIBZEDMD_SHA}"
echo " LIBSERUM_SHA: ${LIBSERUM_SHA}"
Expand Down Expand Up @@ -40,8 +38,8 @@ platforms/macos/x64/external.sh
cmake -DPLATFORM=macos -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp third-party/include/libserialport.h ../../third-party/include/
cp -P third-party/runtime-libs/macos/x64/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -P build/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -a third-party/runtime-libs/macos/x64/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -r test ../../
cd ..

Expand All @@ -55,7 +53,7 @@ cd libserum-$LIBSERUM_SHA
cp src/serum-decode.h ../../third-party/include/
cmake -DPLATFORM=macos -DARCH=x64 -DBUILD_SHARED=ON -DBUILD_STATIC=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/x64/
cd ..

#
Expand All @@ -73,5 +71,5 @@ cmake -DSOCKPP_BUILD_SHARED=ON \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-B build
cmake --build build -- -j${NUM_PROCS}
cp -P build/*.dylib ../../third-party/runtime-libs/macos/x64/
cp -a build/*.dylib ../../third-party/runtime-libs/macos/x64/
cd ..
Loading

0 comments on commit 6ceb0af

Please sign in to comment.