Speeding-up GitHub build-bots #562
Workflow file for this run
This file contains hidden or 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: macos | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| env: | |
| CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm-cache | |
| jobs: | |
| build-macos: | |
| runs-on: macos-15 | |
| 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- | |
| - name: Install dependencies | |
| run: brew install pkg-config glfw meson aras-p/clangbuildanalyzer/clangbuildanalyzer | |
| - name: Trust git repo | |
| run: git config --global --add safe.directory '*' | |
| - name: Build profiler | |
| run: | | |
| # NOTE: disabling LTO to speed-up the GitHub macOS build bots (would take 30+ min otherwise) | |
| cmake -B profiler/build -S profiler -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} -DNO_LTO=ON -DCMAKE_CXX_FLAGS="-ftime-trace" | |
| ClangBuildAnalyzer --start profiler/build | |
| cmake --build profiler/build --parallel --config Release | |
| ClangBuildAnalyzer --stop profiler/build profiler_build.bin | |
| ClangBuildAnalyzer --analyze profiler_build.bin | |
| - name: Build update | |
| run: | | |
| cmake -B update/build -S update -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} | |
| cmake --build update/build --parallel --config Release | |
| - name: Build capture | |
| run: | | |
| cmake -B capture/build -S capture -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} | |
| cmake --build capture/build --parallel --config Release | |
| - name: Build csvexport | |
| run: | | |
| cmake -B csvexport/build -S csvexport -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} | |
| cmake --build csvexport/build --parallel --config Release | |
| - name: Build import | |
| run: | | |
| cmake -B import/build -S import -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} | |
| cmake --build import/build --parallel --config Release | |
| - name: Build merge | |
| run: | | |
| cmake -B merge/build -S merge -DCMAKE_BUILD_TYPE=Release -DGIT_REV=${{ github.sha }} | |
| cmake --build merge/build --parallel --config Release | |
| - name: Build library | |
| run: meson setup -Dprefix=$GITHUB_WORKSPACE/bin/lib -Dtracy_enable=true build && meson compile -C build && meson install -C build | |
| - name: Test application | |
| uses: ./.github/actions/test-tracy | |
| - name: Package artifacts | |
| run: | | |
| mkdir -p bin | |
| cp profiler/build/tracy-profiler bin | |
| cp update/build/tracy-update bin | |
| cp capture/build/tracy-capture bin | |
| cp csvexport/build/tracy-csvexport bin | |
| cp import/build/tracy-import-chrome bin | |
| cp import/build/tracy-import-fuchsia bin | |
| cp merge/build/tracy-merge bin | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos | |
| path: bin |