mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
118 lines
4.4 KiB
YAML
118 lines
4.4 KiB
YAML
name: linux
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
continue-on-error: true # Allow other platforms to build even if one fails
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Linux Dependencies
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: sudo apt-get install -y libcapstone-dev libtbb-dev libglfw3-dev libgtk-3-dev
|
|
|
|
- name: Windows MSVC
|
|
if: startsWith(matrix.os, 'windows')
|
|
uses: microsoft/setup-msbuild@v2
|
|
|
|
- name: Install Windows Dependencies
|
|
if: startsWith(matrix.os, 'windows')
|
|
run: ./vcpkg/install_vcpkg_dependencies.bat
|
|
|
|
- name: Install MacOS Dependencies
|
|
if: startsWith(matrix.os, 'macos')
|
|
run: brew install capstone tbb pkg-config glfw meson dbus
|
|
|
|
- name: Build Profiler
|
|
run: |
|
|
cmake -B build/profiler -S profiler -DLEGACY=ON
|
|
cmake --build build/profiler --config Release --parallel
|
|
|
|
- name: Build Update
|
|
run: |
|
|
cmake -B build/update -S update
|
|
cmake --build build/update --config Release --parallel
|
|
|
|
- name: Build Capture
|
|
run: |
|
|
cmake -B build/capture -S capture
|
|
cmake --build build/capture --config Release --parallel
|
|
|
|
- name: Build Csv Export
|
|
run: |
|
|
cmake -B build/csvexport -S csvexport
|
|
cmake --build build/csvexport --config Release --parallel
|
|
|
|
- name: Build Import Chrome
|
|
run: |
|
|
cmake -B build/import-chrome -S import-chrome
|
|
cmake --build build/import-chrome --config Release --parallel
|
|
|
|
- name: Build Import Fuchsia
|
|
run: |
|
|
cmake -B build/import-fuchsia -S import-fuchsia
|
|
cmake --build build/import-fuchsia --config Release --parallel
|
|
|
|
- name: Find Artifacts
|
|
if: ${{ !startsWith(matrix.os, 'windows') }}
|
|
id: find_artifacts
|
|
run: |
|
|
echo PROFILER_PATH=build/profiler/Tracy >> $GITHUB_OUTPUT
|
|
echo UPDATE_PATH=build/update/update >> $GITHUB_OUTPUT
|
|
echo CAPTURE_PATH=build/capture/capture >> $GITHUB_OUTPUT
|
|
echo CSVEXPORT_PATH=build/csvexport/csvexport >> $GITHUB_OUTPUT
|
|
echo IMPORT_CHROME_PATH=build/import-chrome/import-chrome >> $GITHUB_OUTPUT
|
|
echo IMPORT_FUCHSIA_PATH=build/import-fuchsia/import-fuchsia >> $GITHUB_OUTPUT
|
|
|
|
- name: Find Artifacts Windows
|
|
if: startsWith(matrix.os, 'windows')
|
|
id: find_artifacts_windows
|
|
run: |
|
|
echo PROFILER_PATH=build/profiler/Release/Tracy.exe >> $GITHUB_OUTPUT
|
|
echo UPDATE_PATH=build/update/Release/update.exe >> $GITHUB_OUTPUT
|
|
echo CAPTURE_PATH=build/capture/Release/capture.exe >> $GITHUB_OUTPUT
|
|
echo CSVEXPORT_PATH=build/csvexport/Release/csvexport.exe >> $GITHUB_OUTPUT
|
|
echo IMPORT_CHROME_PATH=build/import-chrome/Release/import-chrome.exe >> $GITHUB_OUTPUT
|
|
echo IMPORT_FUCHSIA_PATH=build/import-fuchsia/Release/import-fuchsia.exe >> $GITHUB_OUTPUT
|
|
|
|
- name: Export Artifacts
|
|
if: ${{ !startsWith(matrix.os, 'windows') }}
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.os }}
|
|
path: |
|
|
${{ steps.find_artifacts.outputs.PROFILER_PATH }}
|
|
${{ steps.find_artifacts.outputs.UPDATE_PATH }}
|
|
${{ steps.find_artifacts.outputs.CAPTURE_PATH }}
|
|
${{ steps.find_artifacts.outputs.CSVEXPORT_PATH }}
|
|
${{ steps.find_artifacts.outputs.IMPORT_CHROME_PATH }}
|
|
${{ steps.find_artifacts.outputs.IMPORT_FUCHSIA_PATH }}
|
|
|
|
- name: Export Artifacts Windows
|
|
if: startsWith(matrix.os, 'windows')
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ matrix.os }}
|
|
path: |
|
|
${{ steps.find_artifacts_windows.outputs.PROFILER_PATH }}
|
|
${{ steps.find_artifacts_windows.outputs.UPDATE_PATH }}
|
|
${{ steps.find_artifacts_windows.outputs.CAPTURE_PATH }}
|
|
${{ steps.find_artifacts_windows.outputs.CSVEXPORT_PATH }}
|
|
${{ steps.find_artifacts_windows.outputs.IMPORT_CHROME_PATH }}
|
|
${{ steps.find_artifacts_windows.outputs.IMPORT_FUCHSIA_PATH }}
|
|
|