From 9ecca485ab41314edd6d37e7c9a2d9917ad00243 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:38:24 +0700 Subject: [PATCH 01/10] fix: CI add job to sync --- .github/workflows/auto-bump-llamacpp.yml | 37 ++++++++++++++++++++++++ .gitmodules | 1 + 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/auto-bump-llamacpp.yml diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml new file mode 100644 index 000000000..5e5dd5dbd --- /dev/null +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -0,0 +1,37 @@ +name: Auto Bump llama.cpp +on: + push: + branches: + - feat/auto_bump_llamacpp + schedule: + - cron: '0 2 * * *' + workflow_dispatch: + + +jobs: + auto-bump: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Check changes llama.cpp master HEAD and push update if any + id: git-status + run: | + git submodule foreach git pull origin master --allow-unrelated-histories + + git config --global user.name 'Nitro Bot' + git config --global user.email 'nitro-bot@jan.ai' + + git add . + git commit -am "Update llama.cpp" + + git push -o merge_request.create \ + -o merge_request.remove_source_branch \ + -o merge_request.target=main \ + -o merge_request.title="Version bump for llama.cpp" \ + -o merge_request.assign="vuonghoainam" \ + origin main:"bump_llamacpp" || true + \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 81bc6f386..a10a6776d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "llama.cpp"] path = llama.cpp url = https://github.com/ggerganov/llama.cpp + branch = master From 6069568515a7a170ba34c39c95fb3072e9946544 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:42:09 +0700 Subject: [PATCH 02/10] fix: use normal command to reset head master --- .github/workflows/auto-bump-llamacpp.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 5e5dd5dbd..ac466841c 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -1,13 +1,9 @@ name: Auto Bump llama.cpp on: - push: - branches: - - feat/auto_bump_llamacpp schedule: - cron: '0 2 * * *' workflow_dispatch: - jobs: auto-bump: runs-on: ubuntu-latest @@ -20,7 +16,10 @@ jobs: - name: Check changes llama.cpp master HEAD and push update if any id: git-status run: | - git submodule foreach git pull origin master --allow-unrelated-histories + cd llama.cpp/ + git fetch origin + git checkout master + git reset --hard origin/master git config --global user.name 'Nitro Bot' git config --global user.email 'nitro-bot@jan.ai' From 0b8b80b77fc3c50192c0d481d58dae4fbe908161 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:44:11 +0700 Subject: [PATCH 03/10] chore: trigger event --- .github/workflows/auto-bump-llamacpp.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index ac466841c..bd38b787c 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -3,6 +3,9 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: + push: + branches: + - feat/auto_bump_llamacpp jobs: auto-bump: From 14a7170467c5d418b1cb6c7e3510c0d22b9a92b4 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:45:12 +0700 Subject: [PATCH 04/10] fix: add cd ../ --- .github/workflows/auto-bump-llamacpp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index bd38b787c..67ea9fec8 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -23,6 +23,7 @@ jobs: git fetch origin git checkout master git reset --hard origin/master + cd ../ git config --global user.name 'Nitro Bot' git config --global user.email 'nitro-bot@jan.ai' From 070efa024a459799bd1ad165702eb4543db82984 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:51:46 +0700 Subject: [PATCH 05/10] fix: CI add local branch reference --- .github/workflows/auto-bump-llamacpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 67ea9fec8..18f00d04e 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -36,5 +36,5 @@ jobs: -o merge_request.target=main \ -o merge_request.title="Version bump for llama.cpp" \ -o merge_request.assign="vuonghoainam" \ - origin main:"bump_llamacpp" || true + origin ${{ github.ref }}:"bump_llamacpp" || true \ No newline at end of file From 3d1d6fe5081265490570334a74e638fb5021f498 Mon Sep 17 00:00:00 2001 From: hiro Date: Sat, 9 Dec 2023 02:59:08 +0700 Subject: [PATCH 06/10] fix: Update CI workflow for creating PR --- .github/workflows/auto-bump-llamacpp.yml | 26 +++++++++++++----------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 18f00d04e..1e0307d59 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -25,16 +25,18 @@ jobs: git reset --hard origin/master cd ../ - git config --global user.name 'Nitro Bot' - git config --global user.email 'nitro-bot@jan.ai' - - git add . - git commit -am "Update llama.cpp" - - git push -o merge_request.create \ - -o merge_request.remove_source_branch \ - -o merge_request.target=main \ - -o merge_request.title="Version bump for llama.cpp" \ - -o merge_request.assign="vuonghoainam" \ - origin ${{ github.ref }}:"bump_llamacpp" || true + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: Update llama.cpp + title: Auto bump llama.cpp version + body: Auto bump llama.cpp version + branch: bump_llamacpp + branch-suffix: timestamp + labels: "type: chore" + reviewers: tikikun + assignees: vuonghoainam + delete-branch: true + add-paths : "llama.cpp" \ No newline at end of file From 818b7a2ce099e5936030f7f3f1799655f8775308 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 12 Dec 2023 06:31:46 +0700 Subject: [PATCH 07/10] chore: rebase main --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 8a7b2fa52..fbbc42827 160000 --- a/llama.cpp +++ b/llama.cpp @@ -1 +1 @@ -Subproject commit 8a7b2fa528f130631a5f43648481596ab320ed5a +Subproject commit fbbc42827b2949b95bcde23ce47bb47d006c895d From b8265f52c6a3b0eb3e7e2214d7b2fe5b4859ed8d Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 12 Dec 2023 06:32:00 +0700 Subject: [PATCH 08/10] chore: Update target branch name --- .github/workflows/auto-bump-llamacpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 1e0307d59..4e65dc8f9 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -32,7 +32,7 @@ jobs: commit-message: Update llama.cpp title: Auto bump llama.cpp version body: Auto bump llama.cpp version - branch: bump_llamacpp + branch: bump-llamacpp branch-suffix: timestamp labels: "type: chore" reviewers: tikikun From 8a3aa39fbddf0c20deed7b06451bc6af0cede9b6 Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Tue, 12 Dec 2023 08:08:02 +0700 Subject: [PATCH 09/10] Update auto-bump-llamacpp.yml --- .github/workflows/auto-bump-llamacpp.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 4e65dc8f9..444efc047 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -3,9 +3,6 @@ on: schedule: - cron: '0 2 * * *' workflow_dispatch: - push: - branches: - - feat/auto_bump_llamacpp jobs: auto-bump: @@ -39,4 +36,4 @@ jobs: assignees: vuonghoainam delete-branch: true add-paths : "llama.cpp" - \ No newline at end of file + From 689c82d37edd58e81d9037d52a01ed4069b79841 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 12 Dec 2023 08:08:30 +0700 Subject: [PATCH 10/10] fix: Auto bump fix base branch --- .github/workflows/auto-bump-llamacpp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-bump-llamacpp.yml b/.github/workflows/auto-bump-llamacpp.yml index 444efc047..f3d08f544 100644 --- a/.github/workflows/auto-bump-llamacpp.yml +++ b/.github/workflows/auto-bump-llamacpp.yml @@ -36,4 +36,5 @@ jobs: assignees: vuonghoainam delete-branch: true add-paths : "llama.cpp" + base: main