-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (74 loc) · 2.46 KB
/
Copy pathmatrix.yml
File metadata and controls
80 lines (74 loc) · 2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Matrix
on:
push:
branches:
- '🙄'
permissions:
contents: read
jobs:
build:
name: Build git
runs-on: ubuntu-latest
steps:
- run: |
DIR=$( pwd )
sudo sed -i -e 's/Types: deb/Types: deb deb-src/' /etc/apt/sources.list.d/ubuntu.sources
sudo apt-get update
sudo apt-get build-dep git
git clone --depth=1 https://github.com/git/git
cd git
git fetch --depth=1 origin 22c9b6bd93ef8975deebd2a4439aa428ab22118b
git checkout 22c9b6bd93ef8975deebd2a4439aa428ab22118b
make -j 4
make install
cd ~
tar --xz -cvvf "$DIR/git.tar.xz" bin libexec
- uses: actions/upload-artifact@v7
with:
path: git.tar.xz
retention-days: 1
compression-level: 0
archive: false
test:
name: Test git deepen ${{ matrix.n }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [ build ]
strategy:
matrix:
n: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ]
steps:
- uses: actions/download-artifact@v8
with:
name: git.tar.xz
- run: |
DIR=$( pwd )
cd ~
tar -xvvf "$DIR/git.tar.xz" bin libexec
cd "$DIR"
function git {
printf '\e[32mgit'
printf ' %q' "$@"
printf '\e[0m\n'
~/bin/git "$@"
}
git --version
git init .
git remote add origin https://github.com/Automattic/jetpack
git config --local gc.auto 0
git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=10 origin 57a055c07d944301558ce5727f803ee427abd15d
git sparse-checkout disable
git config --local --unset-all extensions.worktreeConfig
git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=10 origin 57a055c07d944301558ce5727f803ee427abd15d 77c13651933aedae78b1f6a2e3e0cef84943d2a3
echo "---"
stat .git/shallow
cat .git/shallow
echo "---"
EXIT=0
if ! git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=20 origin 57a055c07d944301558ce5727f803ee427abd15d 77c13651933aedae78b1f6a2e3e0cef84943d2a3; then
EXIT=1
fi
echo "---"
stat .git/shallow
cat .git/shallow
exit $EXIT