From 730dce67e6b5c65aedafd9d5e9761f7b9d778fd2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 20 Feb 2026 00:10:57 +0100 Subject: [PATCH] Split build.yml into windows.yml and macos.yml. --- .github/workflows/{build.yml => macos.yml} | 50 ++++------------- .github/workflows/windows.yml | 63 ++++++++++++++++++++++ 2 files changed, 74 insertions(+), 39 deletions(-) rename .github/workflows/{build.yml => macos.yml} (58%) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/build.yml b/.github/workflows/macos.yml similarity index 58% rename from .github/workflows/build.yml rename to .github/workflows/macos.yml index aa1fd37b..25514c33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/macos.yml @@ -1,4 +1,4 @@ -name: build +name: macos on: push: @@ -12,12 +12,7 @@ env: jobs: build: - strategy: - matrix: - os: [ windows-latest, macos-15 ] - - runs-on: ${{ matrix.os }} - continue-on-error: true + runs-on: macos-15 steps: - uses: actions/checkout@v4 - name: Cache CPM packages @@ -26,45 +21,33 @@ jobs: path: ${{ env.CPM_SOURCE_CACHE }} key: ${{ runner.os }}-cpm-${{ hashFiles('**/vendor.cmake', '**/CMakeLists.txt') }} restore-keys: ${{ runner.os }}-cpm- - - if: startsWith(matrix.os, 'windows') - uses: microsoft/setup-msbuild@v2 - - if: startsWith(matrix.os, 'windows') - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - if: startsWith(matrix.os, 'windows') - run: pip install meson ninja - - if: startsWith(matrix.os, 'macos') - name: Install macos dependencies + - name: Install dependencies run: brew install pkg-config glfw meson - name: Trust git repo run: git config --global --add safe.directory '*' - - name: Profiler GUI + - name: Build profiler run: | cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} cmake --build profiler/build --parallel --config Release - - name: Update utility + - name: Build update run: | cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release cmake --build update/build --parallel --config Release - - name: Capture utility + - name: Build capture run: | cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release cmake --build capture/build --parallel --config Release - - name: Csvexport utility + - name: Build csvexport run: | cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release cmake --build csvexport/build --parallel --config Release - - name: Import utilities + - name: Build import run: | cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release cmake --build import/build --parallel --config Release - - if: ${{ !startsWith(matrix.os, 'windows') }} - name: Library + - name: Build library run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib build && meson compile -C build && meson install -C build - - if: ${{ !startsWith(matrix.os, 'windows') }} - name: Find Artifacts - id: find_artifacts + - name: Package artifacts run: | mkdir -p bin cp profiler/build/tracy-profiler bin @@ -73,18 +56,7 @@ jobs: cp csvexport/build/tracy-csvexport bin cp import/build/tracy-import-chrome bin cp import/build/tracy-import-fuchsia bin - - if: startsWith(matrix.os, 'windows') - name: Find Artifacts - id: find_artifacts_windows - run: | - mkdir bin - copy profiler\build\Release\tracy-profiler.exe bin - copy update\build\Release\tracy-update.exe bin - copy capture\build\Release\tracy-capture.exe bin - copy csvexport\build\Release\tracy-csvexport.exe bin - copy import\build\Release\tracy-import-chrome.exe bin - copy import\build\Release\tracy-import-fuchsia.exe bin - uses: actions/upload-artifact@v4 with: - name: ${{ matrix.os }} + name: macos path: bin diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 00000000..9a939250 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,63 @@ +name: windows + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache + +jobs: + build: + runs-on: windows-latest + steps: + - 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- + - uses: microsoft/setup-msbuild@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - run: pip install meson ninja + - name: Trust git repo + run: git config --global --add safe.directory '*' + - name: Build profiler + run: | + cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} + cmake --build profiler/build --parallel --config Release + - name: Build update + run: | + cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release + cmake --build update/build --parallel --config Release + - name: Build capture + run: | + cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release + cmake --build capture/build --parallel --config Release + - name: Build csvexport + run: | + cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release + cmake --build csvexport/build --parallel --config Release + - name: Build import + run: | + cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release + cmake --build import/build --parallel --config Release + - name: Package artifacts + run: | + mkdir bin + copy profiler\build\Release\tracy-profiler.exe bin + copy update\build\Release\tracy-update.exe bin + copy capture\build\Release\tracy-capture.exe bin + copy csvexport\build\Release\tracy-csvexport.exe bin + copy import\build\Release\tracy-import-chrome.exe bin + copy import\build\Release\tracy-import-fuchsia.exe bin + - uses: actions/upload-artifact@v4 + with: + name: windows + path: bin