diff options
| -rw-r--r-- | .github/workflows/release.yml | 22 | ||||
| -rw-r--r-- | CMakeLists.txt | 1 |
2 files changed, 18 insertions, 5 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0a738138..e68118176 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -134,6 +134,7 @@ jobs: ) for b in "${binaries[@]}"; do if [[ -f "$b" ]]; then + echo "Signing binary '$b'..." /usr/bin/codesign --force --options runtime -s "${IDENTITY_ID}" "$b" -v 7z a "slang-macos-dist.zip" "$b" fi @@ -156,14 +157,25 @@ jobs: mv "$(pwd)/build/dist-${config}/slang.tar.gz" "${base}.tar.gz" echo "SLANG_BINARY_ARCHIVE_TAR=${base}.tar.gz" >> "$GITHUB_OUTPUT" + # For some reason, the binaries packed by cpack for macos is modified + # by cpack and considered damanged by macos. For now we workaround this + # by repacking all the binaries into the release package. + if [[ "${{ matrix.os }}" == "macos" ]]; then + mkdir ./ttmp + unzip "${base}.zip" -d ./ttmp + + /bin/cp -rf build/Release/bin/* ./ttmp/bin/ + /bin/cp -rf build/Release/lib/* ./ttmp/lib/ + rm ${base}.zip + rm ${base}.tar.gz + cd ./ttmp + 7z a ../${base}.zip . + tar -czvf ../${base}.tar.gz . + cd ../ + fi - name: File check run: | find "build/dist-$config" -print0 ! -iname '*.md' ! -iname '*.h' -type f | xargs -0 file - if [ "${{matrix.os}}" = "macos" ]; then - find "build/dist-$config" -print0 ! -iname '*.md' ! -iname '*.h' -type f | - xargs -0 codesign --verify --verbose=2 || - echo "code signing failed" - fi - name: UploadBinary uses: softprops/action-gh-release@v1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dd289a8d..86bba5665 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -789,6 +789,7 @@ endif() # set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON) +set(CPACK_STRIP_FILES FALSE) install(FILES "${slang_SOURCE_DIR}/README.md" "${slang_SOURCE_DIR}/LICENSE" |
