* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
@ 2022-12-16 10:08 ` classabbyamp
2022-12-16 10:14 ` classabbyamp
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:08 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 6161 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/3] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From d0ae7575ce79c6a9ee44966befd81e6ae12b15b3 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/3] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..4eda82e2b4cf 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.repositoryUrl }}
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.repositoryUrl }}
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..9717f3a2e785 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.repositoryUrl }}
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 4a63868fd5667627528400c8cebec2bb1123d8bf Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/3] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
2022-12-16 10:08 ` [PR PATCH] [Updated] " classabbyamp
@ 2022-12-16 10:14 ` classabbyamp
2022-12-16 10:21 ` classabbyamp
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 6239 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/3] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/3] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/3] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
2022-12-16 10:08 ` [PR PATCH] [Updated] " classabbyamp
2022-12-16 10:14 ` classabbyamp
@ 2022-12-16 10:21 ` classabbyamp
2022-12-16 10:32 ` classabbyamp
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 8429 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/4] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/4] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/4] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/4] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (2 preceding siblings ...)
2022-12-16 10:21 ` classabbyamp
@ 2022-12-16 10:32 ` classabbyamp
2022-12-16 10:36 ` classabbyamp
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 11190 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/5] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/5] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/5] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/5] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From ccc306d7de717c5265865cde386344d3afc910be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:32:33 -0500
Subject: [PATCH 5/5] fixup! fixup! .github/workflows: use checkout script
instead of action
---
.github/workflows/build.yaml | 10 ++++++++--
.github/workflows/cycles.yml | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index aa52dd5292fc..5408b6efc3ea 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
@@ -84,8 +87,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 6631b2a2b3d5..aee27509014e 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (3 preceding siblings ...)
2022-12-16 10:32 ` classabbyamp
@ 2022-12-16 10:36 ` classabbyamp
2022-12-16 10:46 ` classabbyamp
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 13232 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/6] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/6] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/6] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/6] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From ccc306d7de717c5265865cde386344d3afc910be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:32:33 -0500
Subject: [PATCH 5/6] fixup! fixup! .github/workflows: use checkout script
instead of action
---
.github/workflows/build.yaml | 10 ++++++++--
.github/workflows/cycles.yml | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index aa52dd5292fc..5408b6efc3ea 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
@@ -84,8 +87,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 6631b2a2b3d5..aee27509014e 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
From 210fcee79565cbe42a9077d93cc1b4b9c2711e8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:36:25 -0500
Subject: [PATCH 6/6] fixup! fixup! fixup! .github/workflows: use checkout
script instead of action
---
.github/workflows/build.yaml | 4 ++--
.github/workflows/cycles.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 5408b6efc3ea..e2377c861e72 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -92,7 +92,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index aee27509014e..578340d1a993 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (4 preceding siblings ...)
2022-12-16 10:36 ` classabbyamp
@ 2022-12-16 10:46 ` classabbyamp
2022-12-16 10:59 ` classabbyamp
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 14101 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/7] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/7] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/7] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/7] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From ccc306d7de717c5265865cde386344d3afc910be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:32:33 -0500
Subject: [PATCH 5/7] fixup! fixup! .github/workflows: use checkout script
instead of action
---
.github/workflows/build.yaml | 10 ++++++++--
.github/workflows/cycles.yml | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index aa52dd5292fc..5408b6efc3ea 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
@@ -84,8 +87,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 6631b2a2b3d5..aee27509014e 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
From 210fcee79565cbe42a9077d93cc1b4b9c2711e8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:36:25 -0500
Subject: [PATCH 6/7] fixup! fixup! fixup! .github/workflows: use checkout
script instead of action
---
.github/workflows/build.yaml | 4 ++--
.github/workflows/cycles.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 5408b6efc3ea..e2377c861e72 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -92,7 +92,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index aee27509014e..578340d1a993 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From 9f95b0f4438d0be3837a2a6a3a9f8042c1719ff1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:46:39 -0500
Subject: [PATCH 7/7] fixup! fixup! fixup! fixup! .github/workflows: use
checkout script instead of action
---
.github/workflows/build.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e2377c861e72..1cb4de74191d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -28,6 +28,7 @@ jobs:
steps:
- name: Clone and checkout
run: |
+ echo $PWD
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (5 preceding siblings ...)
2022-12-16 10:46 ` classabbyamp
@ 2022-12-16 10:59 ` classabbyamp
2022-12-16 11:02 ` classabbyamp
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 10:59 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 17855 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/8] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/8] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/8] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/8] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From ccc306d7de717c5265865cde386344d3afc910be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:32:33 -0500
Subject: [PATCH 5/8] fixup! fixup! .github/workflows: use checkout script
instead of action
---
.github/workflows/build.yaml | 10 ++++++++--
.github/workflows/cycles.yml | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index aa52dd5292fc..5408b6efc3ea 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
@@ -84,8 +87,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 6631b2a2b3d5..aee27509014e 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
From 210fcee79565cbe42a9077d93cc1b4b9c2711e8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:36:25 -0500
Subject: [PATCH 6/8] fixup! fixup! fixup! .github/workflows: use checkout
script instead of action
---
.github/workflows/build.yaml | 4 ++--
.github/workflows/cycles.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 5408b6efc3ea..e2377c861e72 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -92,7 +92,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index aee27509014e..578340d1a993 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From 9f95b0f4438d0be3837a2a6a3a9f8042c1719ff1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:46:39 -0500
Subject: [PATCH 7/8] fixup! fixup! fixup! fixup! .github/workflows: use
checkout script instead of action
---
.github/workflows/build.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e2377c861e72..1cb4de74191d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -28,6 +28,7 @@ jobs:
steps:
- name: Clone and checkout
run: |
+ echo $PWD
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
From 63e5bc74a7ae51561163d023fc857e2a61d2e244 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:59:20 -0500
Subject: [PATCH 8/8] fixup! fixup! fixup! fixup! fixup! .github/workflows: use
checkout script instead of action
---
.github/workflows/build.yaml | 47 ++++++++++++++++++------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1cb4de74191d..62ab9b2de848 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -28,18 +28,18 @@ jobs:
steps:
- name: Clone and checkout
run: |
- echo $PWD
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
- # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
- cd void-packages
- git fetch --prune --progress --depth=200 origin \
- +refs/heads/*:refs/remotes/origin/* \
- +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
-
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -86,17 +86,18 @@ jobs:
- name: Clone and checkout
run: |
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
- # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
- cd void-packages
- git fetch --prune --progress --depth=200 origin \
- +refs/heads/*:refs/remotes/origin/* \
- +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
-
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (6 preceding siblings ...)
2022-12-16 10:59 ` classabbyamp
@ 2022-12-16 11:02 ` classabbyamp
2022-12-16 11:36 ` classabbyamp
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 11:02 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 19401 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/9] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 21b17e8a8435cdf7a700d993bbf2e0e6655dd2d4 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/9] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 24 ++++++++++++++-----
.github/workflows/cycles.yml | 45 +++++++++++++++++++++---------------
2 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..12b7f0e1f0dd 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,15 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +79,15 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..e7ecb5075837 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,31 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git checkout ${{ github.ref_name }}
+
+ # required by git 2.35.2+
+ git config --global --add safe.directory "$PWD"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 8f305f7d51b82d1d8d1285f035a72c4fc5548d87 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/9] TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 8b7ad6f6d1aa49affe884c81541a8c54f9698f0b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:20:55 -0500
Subject: [PATCH 4/9] fixup! .github/workflows: use checkout script instead of
action
---
.github/workflows/build.yaml | 6 ++++--
.github/workflows/cycles.yml | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 12b7f0e1f0dd..aa52dd5292fc 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -84,7 +85,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index e7ecb5075837..6631b2a2b3d5 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -31,7 +31,8 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
- git checkout ${{ github.ref_name }}
+ cd void-packages
+ git checkout ${{ github.ref }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From ccc306d7de717c5265865cde386344d3afc910be Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:32:33 -0500
Subject: [PATCH 5/9] fixup! fixup! .github/workflows: use checkout script
instead of action
---
.github/workflows/build.yaml | 10 ++++++++--
.github/workflows/cycles.yml | 5 ++++-
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index aa52dd5292fc..5408b6efc3ea 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
@@ -84,8 +87,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 6631b2a2b3d5..aee27509014e 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -30,8 +30,11 @@ jobs:
run: |
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}.git
+ git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
cd void-packages
+ git fetch --prune --progress --depth=200 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
git checkout ${{ github.ref }}
# required by git 2.35.2+
From 210fcee79565cbe42a9077d93cc1b4b9c2711e8f Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:36:25 -0500
Subject: [PATCH 6/9] fixup! fixup! fixup! .github/workflows: use checkout
script instead of action
---
.github/workflows/build.yaml | 4 ++--
.github/workflows/cycles.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 5408b6efc3ea..e2377c861e72 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
@@ -92,7 +92,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index aee27509014e..578340d1a993 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -35,7 +35,7 @@ jobs:
git fetch --prune --progress --depth=200 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout ${{ github.ref }}
+ git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
# required by git 2.35.2+
git config --global --add safe.directory "$PWD"
From 9f95b0f4438d0be3837a2a6a3a9f8042c1719ff1 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:46:39 -0500
Subject: [PATCH 7/9] fixup! fixup! fixup! fixup! .github/workflows: use
checkout script instead of action
---
.github/workflows/build.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index e2377c861e72..1cb4de74191d 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -28,6 +28,7 @@ jobs:
steps:
- name: Clone and checkout
run: |
+ echo $PWD
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
# https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
From 63e5bc74a7ae51561163d023fc857e2a61d2e244 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:59:20 -0500
Subject: [PATCH 8/9] fixup! fixup! fixup! fixup! fixup! .github/workflows: use
checkout script instead of action
---
.github/workflows/build.yaml | 47 ++++++++++++++++++------------------
1 file changed, 24 insertions(+), 23 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 1cb4de74191d..62ab9b2de848 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -28,18 +28,18 @@ jobs:
steps:
- name: Clone and checkout
run: |
- echo $PWD
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
- # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
- cd void-packages
- git fetch --prune --progress --depth=200 origin \
- +refs/heads/*:refs/remotes/origin/* \
- +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
-
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -86,17 +86,18 @@ jobs:
- name: Clone and checkout
run: |
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
- # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- git clone --filter=tree:0 ${{ github.server_url }}/${{ github.repository }}
- cd void-packages
- git fetch --prune --progress --depth=200 origin \
- +refs/heads/*:refs/remotes/origin/* \
- +${{ github.ref }}:refs/remotes/pull/${{ github.ref_name }}
- git checkout --progress --force refs/remotes/pull/${{ github.ref_name }}
-
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
From 937d8ccd66bf3fc0cdd640d5200c8194ae41405e Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:02:24 -0500
Subject: [PATCH 9/9] fixup! fixup! fixup! fixup! fixup! fixup!
.github/workflows: use checkout script instead of action
---
.github/workflows/build.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 62ab9b2de848..5eb3da82d037 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -32,7 +32,7 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
git clone --progress --no-checkout --filter=tree:0 \
"${{ github.server_url }}/${{ github.repository }}" "$PWD"
- git config gc.auto 0
+ git config --global --add gc.auto 0
git config --global --add safe.directory "$PWD"
/bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
git fetch --prune --progress --filter=tree:0 origin \
@@ -90,7 +90,7 @@ jobs:
/bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
git clone --progress --no-checkout --filter=tree:0 \
"${{ github.server_url }}/${{ github.repository }}" "$PWD"
- git config gc.auto 0
+ git config --global --add gc.auto 0
git config --global --add safe.directory "$PWD"
/bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
git fetch --prune --progress --filter=tree:0 origin \
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (7 preceding siblings ...)
2022-12-16 11:02 ` classabbyamp
@ 2022-12-16 11:36 ` classabbyamp
2022-12-16 11:38 ` classabbyamp
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 11:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 8229 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/4] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 4b40862d704b3910341f21521585fa588742591c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/4] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 34 +++++++++++++++++++-----
.github/workflows/cycles.yml | 50 ++++++++++++++++++++++--------------
2 files changed, 59 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..5eb3da82d037 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,20 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +84,20 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..693321210916 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,36 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 51f352288e2bad8467481adde7fddf59e0717734 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/4] chezmoi: TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From b02875ebebf689bc242b0548d423a54277a17944 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 4/4] common/travis/changed_templates.sh: change branch age
check for treeless
---
common/travis/changed_templates.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..2edd5dbd1972 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,7 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
+base="$(git merge-base FETCH_HEAD "$tip")"
+echo base: $base
+
+[ $(git rev-list --count "$tip" "^$base") -gt 200 ] || {
echo "Your branches is based on too old copy."
echo "Please rebase to newest copy."
exit 1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (8 preceding siblings ...)
2022-12-16 11:36 ` classabbyamp
@ 2022-12-16 11:38 ` classabbyamp
2022-12-16 11:42 ` classabbyamp
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 11:38 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 8229 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 1/4] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 4b40862d704b3910341f21521585fa588742591c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 2/4] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 34 +++++++++++++++++++-----
.github/workflows/cycles.yml | 50 ++++++++++++++++++++++--------------
2 files changed, 59 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..5eb3da82d037 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,20 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +84,20 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..693321210916 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,36 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 51f352288e2bad8467481adde7fddf59e0717734 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 3/4] chezmoi: TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 0c7d5c99d06ff3548afbe788cb3e4613379afffb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 4/4] common/travis/changed_templates.sh: change branch age
check for treeless
---
common/travis/changed_templates.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..d7a3e1dd407b 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,7 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
+base="$(git merge-base FETCH_HEAD "$tip")"
+echo base: $base
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
echo "Your branches is based on too old copy."
echo "Please rebase to newest copy."
exit 1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (9 preceding siblings ...)
2022-12-16 11:38 ` classabbyamp
@ 2022-12-16 11:42 ` classabbyamp
2022-12-16 11:58 ` classabbyamp
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 11:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 8246 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 001/205] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 4b40862d704b3910341f21521585fa588742591c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 002/205] .github/workflows: use checkout script instead of
action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 34 +++++++++++++++++++-----
.github/workflows/cycles.yml | 50 ++++++++++++++++++++++--------------
2 files changed, 59 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..5eb3da82d037 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,20 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +84,20 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..693321210916 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,36 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 51f352288e2bad8467481adde7fddf59e0717734 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 003/205] chezmoi: TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 0c7d5c99d06ff3548afbe788cb3e4613379afffb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 004/205] common/travis/changed_templates.sh: change branch age
check for treeless
---
common/travis/changed_templates.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..d7a3e1dd407b 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,7 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
+base="$(git merge-base FETCH_HEAD "$tip")"
+echo base: $base
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
echo "Your branches is based on too old copy."
echo "Please rebase to newest copy."
exit 1
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (10 preceding siblings ...)
2022-12-16 11:42 ` classabbyamp
@ 2022-12-16 11:58 ` classabbyamp
2022-12-16 12:05 ` classabbyamp
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 11:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 14073 bytes --]
From a8f4d64774bde88410ce8aef454db9a6f3fb37e9 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 001/207] common/travis/fetch_upstream: clean up
---
common/travis/fetch_upstream.sh | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
index e5ec5979493b..0813e0acedbc 100755
--- a/common/travis/fetch_upstream.sh
+++ b/common/travis/fetch_upstream.sh
@@ -1,9 +1,6 @@
#!/bin/sh
#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
+# fetch_upstream.sh
/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 4b40862d704b3910341f21521585fa588742591c Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 002/207] .github/workflows: use checkout script instead of
action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 34 +++++++++++++++++++-----
.github/workflows/cycles.yml | 50 ++++++++++++++++++++++--------------
2 files changed, 59 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..5eb3da82d037 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,9 +26,20 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
@@ -73,9 +84,20 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..693321210916 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,36 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From 51f352288e2bad8467481adde7fddf59e0717734 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 003/207] chezmoi: TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
From 0c7d5c99d06ff3548afbe788cb3e4613379afffb Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 004/207] common/travis/changed_templates.sh: change branch age
check for treeless
---
common/travis/changed_templates.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..d7a3e1dd407b 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,7 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
+base="$(git merge-base FETCH_HEAD "$tip")"
+echo base: $base
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
echo "Your branches is based on too old copy."
echo "Please rebase to newest copy."
exit 1
From 70c8fbe447860e87ba5499e3580208ebe48506b7 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:57:32 -0500
Subject: [PATCH 206/207] fixup! .github/workflows: use checkout script instead
of action
---
.github/workflows/build.yaml | 22 ++++++++++++++--------
.github/workflows/cycles.yml | 9 ++++++---
2 files changed, 20 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 5eb3da82d037..cba299d4b1c0 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -29,18 +29,21 @@ jobs:
- name: Clone and checkout
run: |
REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
git clone --progress --no-checkout --filter=tree:0 \
"${{ github.server_url }}/${{ github.repository }}" "$PWD"
git config --global --add gc.auto 0
git config --global --add safe.directory "$PWD"
- /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
git fetch --prune --progress --filter=tree:0 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:"${REMOTE_REF}"
- /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
git checkout --progress --force "${REMOTE_REF}"
- - run: common/travis/fetch_upstream.sh
+ echo "::endgroup::"
+ # - run: common/travis/fetch_upstream.sh
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
- run: common/travis/fetch-xtools.sh
@@ -87,23 +90,26 @@ jobs:
- name: Clone and checkout
run: |
REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
git clone --progress --no-checkout --filter=tree:0 \
"${{ github.server_url }}/${{ github.repository }}" "$PWD"
git config --global --add gc.auto 0
git config --global --add safe.directory "$PWD"
- /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
git fetch --prune --progress --filter=tree:0 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:"${REMOTE_REF}"
- /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
common/travis/set_mirror.sh &&
common/travis/prepare.sh &&
- common/travis/fetch_upstream.sh &&
+ # common/travis/fetch_upstream.sh &&
common/travis/fetch-xtools.sh
- run: common/travis/changed_templates.sh
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 693321210916..f0631abc899d 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -29,17 +29,20 @@ jobs:
- name: Clone and checkout
run: |
REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
- /bin/echo -e '\x1b[32mCloning repository...\x1b[0m'
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
git clone --progress --no-checkout --filter=tree:0 \
"${{ github.server_url }}/${{ github.repository }}" "$PWD"
git config --global --add gc.auto 0
git config --global --add safe.directory "$PWD"
- /bin/echo -e '\x1b[32mFetching repository refs...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
git fetch --prune --progress --filter=tree:0 origin \
+refs/heads/*:refs/remotes/origin/* \
+${{ github.ref }}:"${REMOTE_REF}"
- /bin/echo -e '\x1b[32mChecking out repository...\x1b[0m'
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- name: Create hostrepo and prepare masterdir
run: |
From e6b5f1e936cd69dab83e55898de61ae55c93c520 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:57:57 -0500
Subject: [PATCH 207/207] fixup! common/travis/changed_templates.sh: change
branch age check for treeless
---
common/travis/changed_templates.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index d7a3e1dd407b..e6a4328e3c49 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -11,11 +11,9 @@ case "$tip" in
esac
base="$(git merge-base FETCH_HEAD "$tip")"
-echo base: $base
[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
- echo "Your branches is based on too old copy."
- echo "Please rebase to newest copy."
+ echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
exit 1
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (11 preceding siblings ...)
2022-12-16 11:58 ` classabbyamp
@ 2022-12-16 12:05 ` classabbyamp
2022-12-16 12:25 ` classabbyamp
2022-12-21 6:15 ` [PR PATCH] [Merged]: " classabbyamp
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 12:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 558 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
WIP for now, still testing
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**|**briefly**|**NO**
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 8999 bytes --]
From 5f5138b3b8adb7c1604d26624ae4684f722c6333 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 1/4] .github/workflows: use checkout script instead of action
also fix indentation in cycle check
---
.github/workflows/build.yaml | 42 ++++++++++++++++++++++------
.github/workflows/cycles.yml | 53 +++++++++++++++++++++++-------------
2 files changed, 68 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..ddb2c4e78f2e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,10 +26,23 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
- - run: common/travis/fetch_upstream.sh
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
- run: common/travis/fetch-xtools.sh
@@ -73,15 +86,28 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
common/travis/set_mirror.sh &&
common/travis/prepare.sh &&
- common/travis/fetch_upstream.sh &&
common/travis/fetch-xtools.sh
- run: common/travis/changed_templates.sh
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..f0631abc899d 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,39 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From bf4750b284e1547e5ec570fe8f4899a9efa10fa0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 2/4] common/travis/fetch_upstream.sh: remove now-unnecessary
script
---
common/travis/fetch_upstream.sh | 9 ---------
1 file changed, 9 deletions(-)
delete mode 100755 common/travis/fetch_upstream.sh
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
deleted file mode 100755
index e5ec5979493b..000000000000
--- a/common/travis/fetch_upstream.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
-
-/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
-git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 2a7335b95aaa445effc10a3c56e2b2c5cbac4a02 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 3/4] common/travis/changed_templates.sh: change branch age
check for treeless
---
common/travis/changed_templates.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..e6a4328e3c49 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,9 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
- echo "Your branches is based on too old copy."
- echo "Please rebase to newest copy."
+base="$(git merge-base FETCH_HEAD "$tip")"
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
+ echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
exit 1
}
From 01ad15d00d61a9258ef9161cdd3fe3a3c644cb4a Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:01:46 -0500
Subject: [PATCH 4/4] chezmoi: TEST COMMIT PLS IGNORE
---
srcpkgs/chezmoi/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/chezmoi/template b/srcpkgs/chezmoi/template
index a2d74b841d70..a74539bb1615 100644
--- a/srcpkgs/chezmoi/template
+++ b/srcpkgs/chezmoi/template
@@ -1,7 +1,7 @@
# Template file for 'chezmoi'
pkgname=chezmoi
version=2.27.3
-revision=1
+revision=2
build_style=go
go_import_path="github.com/twpayne/chezmoi/v2"
go_build_tags="noembeddocs noupgrade"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Updated] ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (12 preceding siblings ...)
2022-12-16 12:05 ` classabbyamp
@ 2022-12-16 12:25 ` classabbyamp
2022-12-21 6:15 ` [PR PATCH] [Merged]: " classabbyamp
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-16 12:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]
There is an updated pull request by classabbyamp against master on the void-packages repository
https://github.com/classabbyamp/void-packages ci/treeless-clone
https://github.com/void-linux/void-packages/pull/41130
ci: use treeless clone instead of actions/checkout
Summary:
- [use treeless fetches instead of `--depth`](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
- this is not supported by `actions/checkout`, so it was implemented as a short script (staying with `actions/checkout@v1` does not seem like a good idea because of its age, and updating to `actions/checkout@v3` would require adding `libstdc++` to any CI workflows that run in void containers because of node's requirements)
- This applies to the build and cycles CI workflows, and some additional cleanups were applied to the cycles workflow
- it can't be implemented as a script in `common/travis/` because the repo doesn't exist on the runner (yet!)
- `changed_templates.sh` had a small logic change, because we now have the complete commit history instead of just `--depth=200`. This preserves the 200 commit limit with a slightly-enhanced error message (wording clarified and it now shows up as an error annotation)
- `fetch_upstream.sh` is no longer needed now that the checkout script fetches the entire commit history of master and the PR branch
#### Testing the changes
- I tested the changes in this PR: **YES**
- successful run: https://github.com/void-linux/void-packages/actions/runs/3712923390
- run with too many commits: https://github.com/void-linux/void-packages/actions/runs/3712884082
A patch file from https://github.com/void-linux/void-packages/pull/41130.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-ci/treeless-clone-41130.patch --]
[-- Type: text/x-diff, Size: 9252 bytes --]
From 40e82759d853209f65aaf4cead81cd9c4538f815 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 05:00:52 -0500
Subject: [PATCH 1/3] .github/workflows: use checkout script instead of action
uses treeless fetches instead of `--depth`. This is not supported by
`actions/checkout`, so it was implemented as a short script (staying
with `actions/checkout@v1` does not seem like a good idea because of
its age, and updating to `actions/checkout@v3` would require adding
`libstdc++` to any CI workflows that run in void containers because
of node's requirements)
see also: https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
this can't be implemented as a script in `common/travis/` because the
repo doesn't exist on the runner (yet!)
also fix indentation in cycle check
---
.github/workflows/build.yaml | 42 ++++++++++++++++++++++------
.github/workflows/cycles.yml | 53 +++++++++++++++++++++++-------------
2 files changed, 68 insertions(+), 27 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index 95f1cd88e338..ddb2c4e78f2e 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -26,10 +26,23 @@ jobs:
LICENSE_LIST: common/travis/license.lst
steps:
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
- - run: common/travis/fetch_upstream.sh
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- run: common/travis/changed_templates.sh
- run: common/travis/fetch-xbps.sh
- run: common/travis/fetch-xtools.sh
@@ -73,15 +86,28 @@ jobs:
# Upgrade again (in case there was a xbps update)
xbps-install -yu
- - uses: actions/checkout@v1
- with:
- fetch-depth: 200
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
- name: Create hostrepo and prepare masterdir
run: |
ln -s "$(pwd)" /hostrepo &&
common/travis/set_mirror.sh &&
common/travis/prepare.sh &&
- common/travis/fetch_upstream.sh &&
common/travis/fetch-xtools.sh
- run: common/travis/changed_templates.sh
diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml
index 7d781076dbe9..f0631abc899d 100644
--- a/.github/workflows/cycles.yml
+++ b/.github/workflows/cycles.yml
@@ -10,7 +10,9 @@ jobs:
permissions:
issues: write
container:
- image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ image: 'ghcr.io/void-linux/xbps-src-masterdir:20220527RC01-x86_64-musl'
+ env:
+ PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin'
steps:
- name: Prepare container
run: |
@@ -23,26 +25,39 @@ jobs:
xbps-install -yu
# Install script dependencies
xbps-install -y python3-networkx github-cli
- - uses: actions/checkout@v1
- with:
- fetch-depth: 1
+
+ - name: Clone and checkout
+ run: |
+ REMOTE_REF=$(echo ${{ github.ref }} | sed 's;refs/;refs/remotes/;')
+ /bin/echo -e '::group::\x1b[32mCloning repository...\x1b[0m'
+ git clone --progress --no-checkout --filter=tree:0 \
+ "${{ github.server_url }}/${{ github.repository }}" "$PWD"
+ git config --global --add gc.auto 0
+ git config --global --add safe.directory "$PWD"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mFetching repository refs...\x1b[0m'
+ git fetch --prune --progress --filter=tree:0 origin \
+ +refs/heads/*:refs/remotes/origin/* \
+ +${{ github.ref }}:"${REMOTE_REF}"
+ echo "::endgroup::"
+ /bin/echo -e '::group::\x1b[32mChecking out repository...\x1b[0m'
+ git checkout --progress --force "${REMOTE_REF}"
+ echo "::endgroup::"
+
- name: Create hostrepo and prepare masterdir
run: |
- ln -s "$(pwd)" /hostrepo &&
- common/travis/set_mirror.sh &&
- common/travis/prepare.sh
+ ln -s "$(pwd)" /hostrepo &&
+ common/travis/set_mirror.sh &&
+ common/travis/prepare.sh
- name: Find cycles and open issues
run: |
- PATH="/usr/libexec/chroot-git:$PATH"
- # required by git 2.35.2+
- git config --global --add safe.directory "$PWD"
- common/scripts/xbps-cycles.py | tee cycles
- grep 'Cycle:' cycles | while read -r line; do
- if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
- printf "Issue on '%s' already exists.\n" "$line"
- else
- gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
- fi
- done
+ common/scripts/xbps-cycles.py | tee cycles
+ grep 'Cycle:' cycles | while read -r line; do
+ if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then
+ printf "Issue on '%s' already exists.\n" "$line"
+ else
+ gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line"
+ fi
+ done
env:
- GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }}
From cf2e7397c4f05e257a8a5dba0918144eb3700964 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 04:59:55 -0500
Subject: [PATCH 2/3] common/travis/fetch_upstream.sh: remove now-unnecessary
script
no longer needed now that the checkout script fetches the entire
commit history of master and the PR branch
---
common/travis/fetch_upstream.sh | 9 ---------
1 file changed, 9 deletions(-)
delete mode 100755 common/travis/fetch_upstream.sh
diff --git a/common/travis/fetch_upstream.sh b/common/travis/fetch_upstream.sh
deleted file mode 100755
index e5ec5979493b..000000000000
--- a/common/travis/fetch_upstream.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# changed_templates.sh
-
-# required by git 2.35.2+
-git config --global --add safe.directory "$PWD"
-
-/bin/echo -e '\x1b[32mFetching upstream...\x1b[0m'
-git fetch --depth 200 https://github.com/void-linux/void-packages.git master
From 17961db670fa3dc18cea6c0b9824c22ec52b69ce Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Fri, 16 Dec 2022 06:36:15 -0500
Subject: [PATCH 3/3] common/travis/changed_templates.sh: change branch age
check for treeless
small logic change because we now have the complete commit history instead
of just `--depth=200`. This preserves the 200 commit limit with a slightly-
enhanced error message (wording clarified and it now shows up as an error
annotation)
---
common/travis/changed_templates.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/common/travis/changed_templates.sh b/common/travis/changed_templates.sh
index 2bed2250ae71..e6a4328e3c49 100755
--- a/common/travis/changed_templates.sh
+++ b/common/travis/changed_templates.sh
@@ -10,9 +10,10 @@ case "$tip" in
*) tip="${tip%% *}" ;;
esac
-base="$(git merge-base FETCH_HEAD "$tip")" || {
- echo "Your branches is based on too old copy."
- echo "Please rebase to newest copy."
+base="$(git merge-base FETCH_HEAD "$tip")"
+
+[ $(git rev-list --count "$tip" "^$base") -lt 200 ] || {
+ echo "::error title=Branch out of date::Your branch is too out of date. Please rebase on upstream and force-push."
exit 1
}
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PR PATCH] [Merged]: ci: use treeless clone instead of actions/checkout
2022-12-16 10:02 [PR PATCH] ci: use treeless clone instead of actions/checkout classabbyamp
` (13 preceding siblings ...)
2022-12-16 12:25 ` classabbyamp
@ 2022-12-21 6:15 ` classabbyamp
14 siblings, 0 replies; 16+ messages in thread
From: classabbyamp @ 2022-12-21 6:15 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1555 bytes --]
There's a merged pull request on the void-packages repository
ci: use treeless clone instead of actions/checkout
https://github.com/void-linux/void-packages/pull/41130
Description:
Summary:
- [use treeless fetches instead of `--depth`](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/)
- this is not supported by `actions/checkout`, so it was implemented as a short script (staying with `actions/checkout@v1` does not seem like a good idea because of its age, and updating to `actions/checkout@v3` would require adding `libstdc++` to any CI workflows that run in void containers because of node's requirements)
- This applies to the build and cycles CI workflows, and some additional cleanups were applied to the cycles workflow
- it can't be implemented as a script in `common/travis/` because the repo doesn't exist on the runner (yet!)
- `changed_templates.sh` had a small logic change, because we now have the complete commit history instead of just `--depth=200`. This preserves the 200 commit limit with a slightly-enhanced error message (wording clarified and it now shows up as an error annotation)
- `fetch_upstream.sh` is no longer needed now that the checkout script fetches the entire commit history of master and the PR branch
#### Testing the changes
- I tested the changes in this PR: **YES**
- successful run: https://github.com/void-linux/void-packages/actions/runs/3712923390
- run with too many commits: https://github.com/void-linux/void-packages/actions/runs/3712884082
^ permalink raw reply [flat|nested] 16+ messages in thread