summaryrefslogtreecommitdiffstats
path: root/.github/workflows/release.yml
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-07-11 11:28:11 +0800
committerGitHub <noreply@github.com>2024-07-10 20:28:11 -0700
commit49c56d742be12a8477eb7d6e2ffb637a6a153482 (patch)
treed18c41f24b971ab8249fa7995f71d29a0c3e1c34 /.github/workflows/release.yml
parentcc86174e079210bcea6021e0ad90ba80dbf4e929 (diff)
Make ci scripts more robust (#4608)
* Remove syntax error in release script * Make ci scripts more robust * Remove lib copying * Add bin directory to RPATH
Diffstat (limited to '.github/workflows/release.yml')
-rw-r--r--.github/workflows/release.yml34
1 files changed, 17 insertions, 17 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5fab3f471..f0a738138 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -62,7 +62,7 @@ jobs:
- name: Change dev tools to host arch (linux and macos)
run: |
- if [[ "${{inputs.os}}" == linux* && "${{inputs.platform}}" == "aarch64" && "$(uname -m)" != "aarch64" ]]; then
+ if [[ "${{matrix.os}}" == linux* && "${{matrix.platform}}" == "aarch64" && "$(uname -m)" != "aarch64" ]]; then
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
fi
@@ -84,8 +84,8 @@ jobs:
-DSLANG_GENERATORS_PATH=build-platform-generators/bin \
-DSLANG_ENABLE_EXAMPLES=OFF \
-DSLANG_EMBED_STDLIB=ON \
- -DSLANG_SLANG_LLVM_FLAVOR=$(
- [[ "${{matrix.build-slang-llvm}}" = "true" ]] && echo "USE_SYSTEM_LLVM" || echo "DISABLE")
+ "-DSLANG_SLANG_LLVM_FLAVOR=$(
+ [[ "${{matrix.build-slang-llvm}}" = "true" ]] && echo "USE_SYSTEM_LLVM" || echo "DISABLE")"
cmake --build --preset "${{matrix.config}}"
@@ -110,18 +110,18 @@ jobs:
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
# import certificate and provisioning profile from secrets
- echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output $CERTIFICATE_PATH
+ echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode --output "$CERTIFICATE_PATH"
# create temporary keychain
- security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
- security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
- security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
+ security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
+ security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
+ security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
# import certificate to keychain
- security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
- security list-keychain -d user -s $KEYCHAIN_PATH
+ security import "$CERTIFICATE_PATH" -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
+ security list-keychain -d user -s "$KEYCHAIN_PATH"
- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${KEYCHAIN_PASSWORD} $KEYCHAIN_PATH
+ security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "$KEYCHAIN_PATH"
binaries=(
"${lib_dir}/libslang.dylib"
@@ -134,14 +134,14 @@ jobs:
)
for b in "${binaries[@]}"; do
if [[ -f "$b" ]]; then
- /usr/bin/codesign --force --options runtime -s ${IDENTITY_ID} "$b" -v
+ /usr/bin/codesign --force --options runtime -s "${IDENTITY_ID}" "$b" -v
7z a "slang-macos-dist.zip" "$b"
fi
done
timeout 1000 gon ./extras/macos-notarize.json
cp slang-macos-dist.zip "slang-macos-dist-${{matrix.platform}}.zip"
- echo "SLANG_NOTARIZED_DIST=slang-macos-dist-${{matrix.platform}}.zip" >> $GITHUB_OUTPUT
+ echo "SLANG_NOTARIZED_DIST=slang-macos-dist-${{matrix.platform}}.zip" >> "$GITHUB_OUTPUT"
- name: Package Slang
id: package
@@ -152,16 +152,16 @@ jobs:
triggering_ref=${{ github.ref_name }}
base=slang-${triggering_ref#v}-${{matrix.os}}-${{matrix.platform}}
mv "$(pwd)/build/dist-${config}/slang.zip" "${base}.zip"
- echo "SLANG_BINARY_ARCHIVE_ZIP=${base}.zip" >> $GITHUB_OUTPUT
+ echo "SLANG_BINARY_ARCHIVE_ZIP=${base}.zip" >> "$GITHUB_OUTPUT"
mv "$(pwd)/build/dist-${config}/slang.tar.gz" "${base}.tar.gz"
- echo "SLANG_BINARY_ARCHIVE_TAR=${base}.tar.gz" >> $GITHUB_OUTPUT
+ echo "SLANG_BINARY_ARCHIVE_TAR=${base}.tar.gz" >> "$GITHUB_OUTPUT"
- name: File check
run: |
- find "build/dist-$config" ! -iname '*.md' ! -iname '*.h' -type f | xargs file
+ find "build/dist-$config" -print0 ! -iname '*.md' ! -iname '*.h' -type f | xargs -0 file
if [ "${{matrix.os}}" = "macos" ]; then
- find "build/dist-$config" ! -iname '*.md' ! -iname '*.h' -type f |
- xargs codesign --verify --verbose=2 ||
+ find "build/dist-$config" -print0 ! -iname '*.md' ! -iname '*.h' -type f |
+ xargs -0 codesign --verify --verbose=2 ||
echo "code signing failed"
fi