From 81637348428cf151e23110df0d7c675458406939 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Thu, 6 Aug 2026 22:20:21 +0200 Subject: [PATCH] Ship Linux CLI tools in a versioned release zip Build the CLI tools in a dedicated ubuntu:24.04 workflow and pack them with the AppImage into a single linux-.zip, matching the Windows/macOS release shape. --- .github/workflows/linux-cli.yml | 66 +++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 16 +++++--- 2 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/linux-cli.yml diff --git a/.github/workflows/linux-cli.yml b/.github/workflows/linux-cli.yml new file mode 100644 index 00000000..9f7715e8 --- /dev/null +++ b/.github/workflows/linux-cli.yml @@ -0,0 +1,66 @@ +name: linux-cli + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + workflow_call: + +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache + +jobs: + build-linux-cli: + runs-on: ubuntu-latest + container: ubuntu:24.04 + steps: + - name: Install dependencies + run: | + apt-get update + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + build-essential cmake git ca-certificates curl + - name: Trust git repo + run: git config --global --add safe.directory '*' + - uses: actions/checkout@v4 + - name: Cache CPM packages + uses: actions/cache@v4 + with: + path: ${{ env.CPM_SOURCE_CACHE }} + key: ${{ runner.os }}-cpm-${{ hashFiles('**/vendor.cmake', '**/CMakeLists.txt') }} + restore-keys: ${{ runner.os }}-cpm- + - name: Build update + run: | + cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release -DNO_ISA_EXTENSIONS=ON -DGIT_REV=${{ github.sha }} + cmake --build update/build --parallel + - name: Build capture + run: | + cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release -DNO_ISA_EXTENSIONS=ON -DGIT_REV=${{ github.sha }} + cmake --build capture/build --parallel + - name: Build csvexport + run: | + cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release -DNO_ISA_EXTENSIONS=ON -DGIT_REV=${{ github.sha }} + cmake --build csvexport/build --parallel + - name: Build import + run: | + cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release -DNO_ISA_EXTENSIONS=ON -DGIT_REV=${{ github.sha }} + cmake --build import/build --parallel + - name: Build merge + run: | + cmake -B merge/build -S merge -DCMAKE_BUILD_TYPE=Release -DNO_ISA_EXTENSIONS=ON -DGIT_REV=${{ github.sha }} + cmake --build merge/build --parallel + - name: Stage release files + run: | + mkdir -p ${{ github.workspace }}/linux-cli + cp update/build/tracy-update ${{ github.workspace }}/linux-cli/ + cp capture/build/tracy-capture ${{ github.workspace }}/linux-cli/ + cp capture/build/tracy-capture-daemon ${{ github.workspace }}/linux-cli/ + cp csvexport/build/tracy-csvexport ${{ github.workspace }}/linux-cli/ + cp import/build/tracy-import-chrome ${{ github.workspace }}/linux-cli/ + cp import/build/tracy-import-fuchsia ${{ github.workspace }}/linux-cli/ + cp merge/build/tracy-merge ${{ github.workspace }}/linux-cli/ + - uses: actions/upload-artifact@v4 + with: + name: linux-cli + path: ${{ github.workspace }}/linux-cli diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 450b6beb..7ac98e6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,8 +17,11 @@ jobs: release-build-appimage: uses: ./.github/workflows/appimage.yml + release-build-linux-cli: + uses: ./.github/workflows/linux-cli.yml + attach-to-release: - needs: [release-build-windows, release-build-macos, release-build-manual, release-build-appimage] + needs: [release-build-windows, release-build-macos, release-build-manual, release-build-appimage, release-build-linux-cli] runs-on: ubuntu-latest permissions: contents: write @@ -37,16 +40,19 @@ jobs: cd macos chmod +x tracy-* tracy-profiler.app/Contents/MacOS/* zip -r ../macos-$VERSION_NO_V.zip . - - name: Create versioned AppImage + - name: Create versioned Linux zip run: | VERSION="${{ github.event.release.tag_name }}" VERSION_NO_V="${VERSION#v}" - mv appimage/tracy-profiler-x86_64.AppImage tracy-profiler-$VERSION_NO_V-x86_64.AppImage - chmod +x tracy-profiler-$VERSION_NO_V-x86_64.AppImage + mkdir linux + cp appimage/* linux/ + cp linux-cli/* linux/ + cd linux + zip -r ../linux-$VERSION_NO_V.zip . - uses: softprops/action-gh-release@v2 with: files: | windows-*.zip macos-*.zip - tracy-profiler-*.AppImage + linux-*.zip manual/tracy.pdf