release: 24.2.0 #295
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release build | |
on: | |
push: | |
branches: | |
- release/** | |
jobs: | |
linux: | |
name: Build Binary on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install rust stable toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Run cargo build | |
run: cargo build --bins --release --locked | |
- name: Split and archive debug info | |
run: | | |
mkdir -p build | |
# Split only symbolicator's debug information | |
objcopy --only-keep-debug target/release/symbolicator{,.debug} | |
objcopy --strip-debug --strip-unneeded target/release/symbolicator | |
objcopy --add-gnu-debuglink target/release/symbolicator{.debug,} | |
zip -j build/symbolicator-Linux-x86_64-debug.zip target/release/symbolicator.debug | |
# Strip debug info for tools | |
objcopy --strip-debug --strip-unneeded target/release/wasm-split | |
objcopy --strip-debug --strip-unneeded target/release/symsorter | |
objcopy --strip-debug --strip-unneeded target/release/symbolicli | |
# Move all binaries | |
mv target/release/symbolicator build/symbolicator-Linux-x86_64 | |
mv target/release/wasm-split build/wasm-split-Linux-x86_64 | |
mv target/release/symsorter build/symsorter-Linux-x86_64 | |
mv target/release/symbolicli build/symbolicli-Linux-x86_64 | |
- uses: actions/[email protected] | |
with: | |
name: ${{ github.sha }} | |
path: build/* | |
mac: | |
# Note: This doesn't use a build matrix, as it requires a last step to merge the x86 | |
# and ARM binaries into one universal one. This need will go away once | |
# https://github.com/rust-lang/cargo/issues/8875 is resolved. | |
name: Build Binary on MacOS | |
runs-on: macos-11 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install rust stable toolchain | |
run: rustup toolchain install stable --profile minimal --target x86_64-apple-darwin --target aarch64-apple-darwin --no-self-update | |
- name: Run cargo build for x86_64 | |
run: cargo build --bins --release --locked --target=x86_64-apple-darwin | |
env: | |
# Generates separate debug symbol files alongside release builds | |
CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO: packed | |
- name: Run cargo build for ARM | |
run: cargo build --bins --release --locked --target=aarch64-apple-darwin | |
env: | |
# Generates separate debug symbol files alongside release builds | |
CARGO_PROFILE_RELEASE_SPLIT_DEBUGINFO: packed | |
- name: Archive debug info and create universal binary | |
run: | | |
mkdir -p build | |
lipo -create -output build/symbolicator-Darwin-universal \ | |
target/x86_64-apple-darwin/release/symbolicator \ | |
target/aarch64-apple-darwin/release/symbolicator | |
lipo -create -output build/wasm-split-Darwin-universal \ | |
target/x86_64-apple-darwin/release/wasm-split \ | |
target/aarch64-apple-darwin/release/wasm-split | |
lipo -create -output build/symsorter-Darwin-universal \ | |
target/x86_64-apple-darwin/release/symsorter \ | |
target/aarch64-apple-darwin/release/symsorter | |
lipo -create -output build/symbolicli-Darwin-universal \ | |
target/x86_64-apple-darwin/release/symbolicli \ | |
target/aarch64-apple-darwin/release/symbolicli | |
cd target/x86_64-apple-darwin/release | |
# Recursive zip the debug symbol folder and place the output in the output directory | |
zip -r ../../../build/symbolicator-x86_64-apple-darwin-debug.zip symbolicator.dSYM | |
cd ../../../ | |
cd target/x86_64-apple-darwin/release | |
zip -r ../../../build/symbolicator-aarch64-apple-darwin-debug.zip symbolicator.dSYM | |
- uses: actions/[email protected] | |
with: | |
name: ${{ github.sha }} | |
path: build/* | |
windows: | |
name: Build Tools on Windows | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install rust stable toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Run cargo build | |
run: cargo build --bins --release --locked | |
- name: Rename Binaries | |
run: | | |
cd target/release | |
mv symbolicator.exe symbolicator-Windows-x86_64.exe | |
mv symsorter.exe symsorter-Windows-x86_64.exe | |
mv symbolicli.exe symbolicli-Windows-x86_64.exe | |
mv wasm-split.exe wasm-split-Windows-x86_64.exe | |
- uses: actions/[email protected] | |
with: | |
name: ${{ github.sha }} | |
path: target/release/*-Windows-x86_64.exe |