Skip to content

Commit

Permalink
ci: fix version build
Browse files Browse the repository at this point in the history
Signed-off-by: thxCode <thxcode0824@gmail.com>
  • Loading branch information
thxCode committed Oct 9, 2024
1 parent 2c04140 commit 3ba2f94
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
actions: read

env:
VERSION: "${{ github.ref_name }}"
LLAMA_BOX_BUILD_VERSION: "${{ github.ref_name }}"

on:
workflow_dispatch: { }
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
--workdir ${{ github.workspace }} \
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down Expand Up @@ -448,7 +448,7 @@ jobs:
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env AMDGPU_TARGETS \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down Expand Up @@ -612,7 +612,7 @@ jobs:
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env CUDA_ARCHITECTURES \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down Expand Up @@ -748,7 +748,7 @@ jobs:
--env CXX=icpx \
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down Expand Up @@ -885,7 +885,7 @@ jobs:
--workdir ${{ github.workspace }} \
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down Expand Up @@ -1006,7 +1006,7 @@ jobs:
--workdir ${{ github.workspace }} \
--env DEBIAN_FRONTEND=noninteractive \
--env CCACHE_DIR \
--env VERSION \
--env LLAMA_BOX_BUILD_VERSION \
--volume /tmp/entrypoint.sh:/entrypoint.sh \
--entrypoint /entrypoint.sh \
${{ matrix.distro_container_image }}
Expand Down
4 changes: 2 additions & 2 deletions llama-box/scripts/gen-version-cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ if (Git_FOUND)
if (RES EQUAL 0)
set(GIT_COMMIT ${HEAD})
endif ()
if (DEFINED ENV{VERSION})
set(GIT_VERSION $ENV{VERSION})
if (DEFINED ENV{LLAMA_BOX_BUILD_VERSION})
set(GIT_VERSION $ENV{LLAMA_BOX_BUILD_VERSION})
else ()
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
Expand Down

0 comments on commit 3ba2f94

Please sign in to comment.