Skip to content

Commit

Permalink
[profile] Add pixi command for tracy
Browse files Browse the repository at this point in the history
  • Loading branch information
jslee02 committed Mar 30, 2024
1 parent 16dcf03 commit a2f0275
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 46 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/cache_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,3 +230,39 @@ jobs:
tags: ${{ env.DOCKER_REPO }}:${{ matrix.image }}-${{ matrix.dart_version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

# Tracy Profiler
tracy:
name: tracy profiler
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dart_version: [v6.14]
build_min: [ON]
env:
OS_VERSION: tracy
DART_VERSION: ${{ matrix.dart_version }}
steps:
# https://github.com/marketplace/actions/docker-setup-qemu
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# https://github.com/marketplace/actions/docker-login
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# https://github.com/marketplace/actions/build-and-push-docker-images
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
file: ./docker/dev/${{ env.DART_VERSION }}/Dockerfile.${{ env.OS_VERSION }}
push: true
tags: ${{ env.DOCKER_REPO }}:${{ env.OS_VERSION }}-${{ env.DART_VERSION }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ dist/

# ImGui configuration
imgui.ini

# Temporary directory for dependencies
.deps
2 changes: 1 addition & 1 deletion cmake/DARTFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if(DART_BUILD_PROFILE)
include(FetchContent)
FetchContent_Declare(tracy
GIT_REPOSITORY https://github.com/wolfpld/tracy.git
GIT_TAG v0.10
GIT_TAG master # TODO: Change to a fixed version once > 0.10 is released
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
Expand Down
22 changes: 10 additions & 12 deletions docker/dev/v6.14/Dockerfile.tracy
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,21 @@ RUN apt-get update && apt-get install -y \
libx11-dev \
libgl1-mesa-dev \
libgtk-3-dev \
libglfw3-dev \
xorg-dev \
ca-certificates \
wayland-protocols \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

# Clone the Tracy Profiler repository
RUN git clone --depth 1 https://github.com/wolfpld/tracy.git

# Build Tracy Profiler
WORKDIR /tracy/profiler/build/unix
RUN cmake ../.. && make

# Use the `entrypoint.sh` to start the profiler
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# TODO: Change to a fixed version once > 0.10 is released
RUN git clone --depth 1 https://github.com/wolfpld/tracy.git -b master \
&& cmake -S tracy/profiler -B tracy/profiler/build -DCMAKE_BUILD_TYPE=Release -DLEGACY=ON \
&& cmake --build tracy/profiler/build --target install -j

# Reset the frontend to its default value
ENV DEBIAN_FRONTEND=
ENV DEBIAN_FRONTEND=

USER 1000

ENTRYPOINT ["tracy/profiler/build/tracy-profiler"]
33 changes: 0 additions & 33 deletions docker/dev/v6.14/Dockerfile.tracy.archlinux

This file was deleted.

7 changes: 7 additions & 0 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ bm-kinematics = { cmd = "cmake --build build --target BM_INTEGRATION_kinematics
"configure",
] }

create-deps-dir = { cmd = "mkdir -p .deps" }
remove-deps-dir = { cmd = "rm -rf .deps" }

tracy-linux = { cmd = "docker run --rm -d -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:rw jslee02/dart-dev:tracy-v6.14" }

[dependencies]
assimp = ">=5.3.1,<5.4"
bullet-cpp = ">=3.25,<4"
Expand Down Expand Up @@ -90,6 +95,8 @@ test-all = { cmd = "cmake --build build -j --target ALL", depends_on = [
"configure",
] }

tracy = { depends_on = ["tracy-linux"] }

[target.linux-64.build-dependencies]
clang-format-14 = ">=14.0.6,<14.1"

Expand Down

0 comments on commit a2f0275

Please sign in to comment.