diff --git a/.github/workflows/cache_docker.yml b/.github/workflows/cache_docker.yml index 24b46f4d71b4f..f7158c362a83c 100644 --- a/.github/workflows/cache_docker.yml +++ b/.github/workflows/cache_docker.yml @@ -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 }} diff --git a/.gitignore b/.gitignore index cbcdbcc402e20..2f8f76de02cc3 100644 --- a/.gitignore +++ b/.gitignore @@ -73,3 +73,6 @@ dist/ # ImGui configuration imgui.ini + +# Temporary directory for dependencies +.deps diff --git a/cmake/DARTFindDependencies.cmake b/cmake/DARTFindDependencies.cmake index 33af2bb1d0aed..51071ce08504c 100644 --- a/cmake/DARTFindDependencies.cmake +++ b/cmake/DARTFindDependencies.cmake @@ -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 ) diff --git a/docker/dev/v6.14/Dockerfile.tracy b/docker/dev/v6.14/Dockerfile.tracy index 73c1188262734..232102cdc4d97 100644 --- a/docker/dev/v6.14/Dockerfile.tracy +++ b/docker/dev/v6.14/Dockerfile.tracy @@ -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= \ No newline at end of file +ENV DEBIAN_FRONTEND= + +USER 1000 + +ENTRYPOINT ["tracy/profiler/build/tracy-profiler"] diff --git a/docker/dev/v6.14/Dockerfile.tracy.archlinux b/docker/dev/v6.14/Dockerfile.tracy.archlinux deleted file mode 100644 index ddfc08491cc8d..0000000000000 --- a/docker/dev/v6.14/Dockerfile.tracy.archlinux +++ /dev/null @@ -1,33 +0,0 @@ -# Use an Arch Linux base image -FROM archlinux:latest - -# Initialize the keyring, populate the Arch Linux keyring, and update the system -RUN pacman-key --init \ - && pacman-key --populate archlinux \ - && pacman -Sy archlinux-keyring --noconfirm \ - && pacman -Su --noconfirm - -# Install build dependencies -RUN pacman -S --noconfirm base-devel \ - cmake \ - git \ - freetype2 \ - tbb \ - debuginfod \ - wayland \ - dbus \ - libxkbcommon \ - libglvnd \ - meson \ - wayland-protocols \ - --needed \ - && pacman -Scc --noconfirm - -# Clone the Tracy Profiler repository -RUN git clone --depth 1 https://github.com/wolfpld/tracy.git -b master - -# Build Tracy Profiler GUI -WORKDIR /tracy/profiler/build -RUN cmake -S ../ -B . && cmake --build . --config Release --parallel - -ENTRYPOINT [ "/tracy/profiler/build/tracy-profiler" ] diff --git a/pixi.toml b/pixi.toml index 68663b9ae38cd..d7a7923a86f19 100644 --- a/pixi.toml +++ b/pixi.toml @@ -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" @@ -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"