mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
debug symbol upload (#7783)
This will let it become slowly eaasier to debug crashes Release Notes: - N/A
This commit is contained in:
parent
b14fbd4ddc
commit
7a6d01e113
2 changed files with 36 additions and 0 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
@ -137,6 +137,8 @@ jobs:
|
||||||
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
||||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
||||||
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
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:
|
steps:
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
|
|
|
@ -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
|
while getopts 'dlfoh' flag
|
||||||
do
|
do
|
||||||
case "${flag}" in
|
case "${flag}" in
|
||||||
|
@ -111,6 +135,16 @@ popd
|
||||||
echo "Bundled ${app_path}"
|
echo "Bundled ${app_path}"
|
||||||
|
|
||||||
if [ "$local_arch" = false ]; then
|
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"
|
echo "Creating fat binaries"
|
||||||
lipo \
|
lipo \
|
||||||
-create \
|
-create \
|
||||||
|
|
Loading…
Reference in a new issue