|
32 | 32 | - name: Clone
|
33 | 33 | id: checkout
|
34 | 34 | uses: actions/checkout@v4
|
| 35 | + with: |
| 36 | + fetch-depth: 0 |
35 | 37 |
|
36 | 38 | - name: Dependencies
|
37 | 39 | id: depends
|
|
88 | 90 | - name: Clone
|
89 | 91 | id: checkout
|
90 | 92 | uses: actions/checkout@v4
|
| 93 | + with: |
| 94 | + fetch-depth: 0 |
91 | 95 |
|
92 | 96 | - name: Dependencies
|
93 | 97 | id: depends
|
@@ -206,6 +210,8 @@ jobs:
|
206 | 210 | - name: Clone
|
207 | 211 | id: checkout
|
208 | 212 | uses: actions/checkout@v4
|
| 213 | + with: |
| 214 | + fetch-depth: 0 |
209 | 215 |
|
210 | 216 | - name: Dependencies
|
211 | 217 | id: depends
|
@@ -238,6 +244,33 @@ jobs:
|
238 | 244 | ./bin/convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
|
239 | 245 | ./bin/main -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
|
240 | 246 |
|
| 247 | + - name: Determine tag name |
| 248 | + id: tag |
| 249 | + shell: bash |
| 250 | + run: | |
| 251 | + BUILD_NUMBER="$(git rev-list --count HEAD)" |
| 252 | + SHORT_HASH="$(git rev-parse --short=7 HEAD)" |
| 253 | + if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then |
| 254 | + echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT |
| 255 | + else |
| 256 | + SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-') |
| 257 | + echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT |
| 258 | + fi |
| 259 | +
|
| 260 | + - name: Pack artifacts |
| 261 | + id: pack_artifacts |
| 262 | + if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }} |
| 263 | + run: | |
| 264 | + cp LICENSE ./build/bin/ |
| 265 | + zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip ./build/bin/* |
| 266 | +
|
| 267 | + - name: Upload artifacts |
| 268 | + if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }} |
| 269 | + uses: actions/upload-artifact@v4 |
| 270 | + with: |
| 271 | + path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-x64.zip |
| 272 | + name: llama-bin-ubuntu-x64.zip |
| 273 | + |
241 | 274 | # ubuntu-latest-cmake-sanitizer:
|
242 | 275 | # runs-on: ubuntu-latest
|
243 | 276 | #
|
|
0 commit comments