Skip to content

Commit cbb1583

Browse files
authored
Fix incorrect usage of github.event
Discovered this while debugging ggml-org#7034 **Warning**: This may change current behavior as all these evaluated to null before!
1 parent bcdee0d commit cbb1583

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

.github/workflows/bench.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232
- cron: '04 2 * * *'
3333

3434
concurrency:
35-
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}-${{ github.event.inputs.sha }}
35+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || github.run_id }}-${{ inputs.sha }}
3636
cancel-in-progress: true
3737

3838
jobs:
@@ -71,7 +71,7 @@ jobs:
7171
uses: actions/checkout@v4
7272
with:
7373
fetch-depth: 0
74-
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
74+
ref: ${{ inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
7575

7676
- name: Install python env
7777
id: pipenv
@@ -138,9 +138,9 @@ jobs:
138138
--runner-label ${{ env.RUNNER_LABEL }} \
139139
--name ${{ github.job }} \
140140
--branch ${{ github.head_ref || github.ref_name }} \
141-
--commit ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha }} \
141+
--commit ${{ inputs.sha || github.event.pull_request.head.sha || github.sha }} \
142142
--scenario script.js \
143-
--duration ${{ github.event.inputs.duration || env.DURATION }} \
143+
--duration ${{ inputs.duration || env.DURATION }} \
144144
--hf-repo ggml-org/models \
145145
--hf-file ${{ matrix.model }}/ggml-model-${{ matrix.ftype }}.gguf \
146146
--model-path-prefix /models \
@@ -243,7 +243,7 @@ jobs:
243243
244244
<summary>Expand details for performance related PR only</summary>
245245
246-
- Concurrent users: ${{ env.N_USERS }}, duration: ${{ github.event.inputs.duration || env.DURATION }}
246+
- Concurrent users: ${{ env.N_USERS }}, duration: ${{ inputs.duration || env.DURATION }}
247247
- HTTP request : avg=${{ env.HTTP_REQ_DURATION_AVG }}ms p(95)=${{ env.HTTP_REQ_DURATION_P_95_ }}ms fails=${{ env.HTTP_REQ_FAILED_PASSES }}, finish reason: stop=${{ env.LLAMACPP_COMPLETIONS_STOP_RATE_PASSES }} truncated=${{ env.LLAMACPP_COMPLETIONS_TRUNCATED_RATE_PASSES }}
248248
- Prompt processing (pp): avg=${{ env.LLAMACPP_PROMPT_PROCESSING_SECOND_AVG }}tk/s p(95)=${{ env.LLAMACPP_PROMPT_PROCESSING_SECOND_P_95_ }}tk/s
249249
- Token generation (tg): avg=${{ env.LLAMACPP_TOKENS_SECOND_AVG }}tk/s p(95)=${{ env.LLAMACPP_TOKENS_SECOND_P_95_ }}tk/s

.github/workflows/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ jobs:
7171
7272
- name: Pack artifacts
7373
id: pack_artifacts
74-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
74+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
7575
run: |
7676
cp LICENSE ./build/bin/
7777
zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
7878
7979
- name: Upload artifacts
80-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
80+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
8181
uses: actions/upload-artifact@v4
8282
with:
8383
path: llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip
@@ -131,13 +131,13 @@ jobs:
131131
132132
- name: Pack artifacts
133133
id: pack_artifacts
134-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
134+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
135135
run: |
136136
cp LICENSE ./build/bin/
137137
zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
138138
139139
- name: Upload artifacts
140-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
140+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
141141
uses: actions/upload-artifact@v4
142142
with:
143143
path: llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip
@@ -259,13 +259,13 @@ jobs:
259259
260260
- name: Pack artifacts
261261
id: pack_artifacts
262-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
262+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
263263
run: |
264264
cp LICENSE ./build/bin/
265265
zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip ./build/bin/*
266266
267267
- name: Upload artifacts
268-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
268+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
269269
uses: actions/upload-artifact@v4
270270
with:
271271
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip
@@ -808,13 +808,13 @@ jobs:
808808
809809
- name: Pack artifacts
810810
id: pack_artifacts
811-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
811+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
812812
run: |
813813
Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
814814
7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64.zip .\build\bin\Release\*
815815
816816
- name: Upload artifacts
817-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
817+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
818818
uses: actions/upload-artifact@v4
819819
with:
820820
path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-x64.zip
@@ -865,12 +865,12 @@ jobs:
865865
866866
- name: Pack artifacts
867867
id: pack_artifacts
868-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
868+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
869869
run: |
870870
7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
871871
872872
- name: Upload artifacts
873-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
873+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
874874
uses: actions/upload-artifact@v4
875875
with:
876876
path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
@@ -884,7 +884,7 @@ jobs:
884884
7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
885885
886886
- name: Upload Cuda runtime
887-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
887+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
888888
uses: actions/upload-artifact@v4
889889
with:
890890
path: cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
@@ -930,12 +930,12 @@ jobs:
930930
931931
- name: Pack artifacts
932932
id: pack_artifacts
933-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
933+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
934934
run: |
935935
7z a llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip ./build/bin/*
936936
937937
- name: Upload artifacts
938-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
938+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
939939
uses: actions/upload-artifact@v4
940940
with:
941941
path: llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip
@@ -993,7 +993,7 @@ jobs:
993993
# gmake CC=/usr/local/bin/clang15 CXX=/usr/local/bin/clang++15 -j `sysctl -n hw.ncpu`
994994

995995
release:
996-
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
996+
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.create_release == 'true' }}
997997

998998
runs-on: ubuntu-latest
999999

.github/workflows/server.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/checkout@v4
6262
with:
6363
fetch-depth: 0
64-
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
64+
ref: ${{ inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
6565

6666
- name: Python setup
6767
id: setup_python
@@ -112,7 +112,7 @@ jobs:
112112
113113
- name: Slow tests
114114
id: server_integration_tests_slow
115-
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
115+
if: ${{ (github.event_name == 'schedule' || inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
116116
run: |
117117
cd examples/server/tests
118118
PORT=8888 ./tests.sh --stop --no-skipped --no-capture --tags slow
@@ -127,7 +127,7 @@ jobs:
127127
uses: actions/checkout@v4
128128
with:
129129
fetch-depth: 0
130-
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
130+
ref: ${{ inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
131131

132132
- name: libCURL
133133
id: get_libcurl
@@ -169,7 +169,7 @@ jobs:
169169
170170
- name: Slow tests
171171
id: server_integration_tests_slow
172-
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
172+
if: ${{ (github.event_name == 'schedule' || inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
173173
run: |
174174
cd examples/server/tests
175175
behave.exe --stop --no-skipped --no-capture --tags slow

0 commit comments

Comments
 (0)