From 30e448d2d50576fa84dc983f7a846d96ec8c8263 Mon Sep 17 00:00:00 2001 From: Jason Couture Date: Tue, 30 Jan 2024 13:27:08 -0500 Subject: [PATCH 1/2] Use event input directly GHA doesn't seem to load the value into the enviroment variable first, so the workflow always runs on master. --- .github/workflows/compile.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 60e8e4c3..4881904f 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -15,7 +15,6 @@ on: env: # Compiler defines common to all platforms COMMON_DEFINE: -DLLAMA_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DLLAMA_BUILD_EXAMPLES=OFF -DLLAMA_BUILD_SERVER=OFF -DBUILD_SHARED_LIBS=ON - LLAMA_CPP_COMMIT: '${{ github.input.events.llama_cpp_commit }}' jobs: compile-linux: @@ -38,7 +37,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: ${{ env.LLAMA_CPP_COMMIT }} + ref: '${{ github.input.events.llama_cpp_commit }}' - name: Build id: cmake_build run: | @@ -71,7 +70,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: ${{ env.LLAMA_CPP_COMMIT }} + ref: '${{ github.input.events.llama_cpp_commit }}' - name: Build id: cmake_build @@ -102,7 +101,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: ${{ env.LLAMA_CPP_COMMIT }} + ref: '${{ github.input.events.llama_cpp_commit }}' - uses: Jimver/cuda-toolkit@v0.2.11 if: runner.os == 'Windows' @@ -158,7 +157,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: ${{ env.LLAMA_CPP_COMMIT }} + ref: '${{ github.input.events.llama_cpp_commit }}' - name: Dependencies continue-on-error: true run: | From 9cfbd2249912d5e09cb759770f6a48f4fd086195 Mon Sep 17 00:00:00 2001 From: Jason Couture Date: Tue, 30 Jan 2024 13:34:59 -0500 Subject: [PATCH 2/2] Fix github variable name I am not on my game today :facepalm: --- .github/workflows/compile.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml index 4881904f..d9a742e6 100644 --- a/.github/workflows/compile.yml +++ b/.github/workflows/compile.yml @@ -37,7 +37,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: '${{ github.input.events.llama_cpp_commit }}' + ref: '${{ github.event.inputs.llama_cpp_commit }}' - name: Build id: cmake_build run: | @@ -70,7 +70,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: '${{ github.input.events.llama_cpp_commit }}' + ref: '${{ github.event.inputs.llama_cpp_commit }}' - name: Build id: cmake_build @@ -101,7 +101,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: '${{ github.input.events.llama_cpp_commit }}' + ref: '${{ github.event.inputs.llama_cpp_commit }}' - uses: Jimver/cuda-toolkit@v0.2.11 if: runner.os == 'Windows' @@ -157,7 +157,7 @@ jobs: with: repository: ggerganov/llama.cpp fetch-depth: 0 - ref: '${{ github.input.events.llama_cpp_commit }}' + ref: '${{ github.event.inputs.llama_cpp_commit }}' - name: Dependencies continue-on-error: true run: |