debug symbol upload (#7783)

This will let it become slowly eaasier to debug crashes

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-14 10:55:37 -07:00 committed by GitHub
parent b14fbd4ddc
commit 7a6d01e113
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 0 deletions

View file

@ -137,6 +137,8 @@ jobs:
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
steps:
- name: Install Node
uses: actions/setup-node@v4

View file

@ -30,6 +30,30 @@ Options:
"
}
function uploadDsym
{
SPACE="zed-debug-symbols"
REGION="nyc3"
file_to_upload="$1"
file_name="$2"
space_path="nightly"
date=$(date +"%a, %d %b %Y %T %z")
acl="x-amz-acl:public-read"
content_type="application/octet-stream"
storage_type="x-amz-storage-class:STANDARD"
string="PUT\n\n${content_type}\n${date}\n${acl}\n${storage_type}\n/${SPACE}/${space_path}/${file_name}"
signature=$(echo -en "${string}" | openssl sha1 -hmac "${DIGITALOCEAN_SPACES_SECRET_KEY}" -binary | base64)
curl --fail -vv -s -X PUT -T "$file_to_upload" \
-H "Host: ${SPACE}.${REGION}.digitaloceanspaces.com" \
-H "Date: $date" \
-H "Content-Type: $content_type" \
-H "$storage_type" \
-H "$acl" \
-H "Authorization: AWS ${DIGITALOCEAN_SPACES_ACCESS_KEY}:$signature" \
"https://${SPACE}.${REGION}.digitaloceanspaces.com/${space_path}/${file_name}"
}
while getopts 'dlfoh' flag
do
case "${flag}" in
@ -111,6 +135,16 @@ popd
echo "Bundled ${app_path}"
if [ "$local_arch" = false ]; then
echo "Uploading dSYMs"
dsymutil --flat target/aarch64-apple-darwin/release/Zed
dsymutil --flat target/x86_64-apple-darwin/release/Zed
version="$(cargo metadata --no-deps --manifest-path crates/zed/Cargo.toml --offline --format-version=1 | jq -r '.packages | map(select(.name == "zed"))[0].version')"
if [ "$channel" == "nightly" ]; then
version="$version-$(git rev-parse --short HEAD)"
fi
uploadDsym target/aarch64-apple-darwin/release/Zed.dwarf "$channel/Zed-$version-aarch64-apple-darwin.dwarf"
uploadDsym target/x86_64-apple-darwin/release/Zed.dwarf "$channel/Zed-$version-x86_64-apple-darwin.dwarf"
echo "Creating fat binaries"
lipo \
-create \