Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
1 name: CI
2 on: [push, pull_request]
3 env:
4 GOTOOLCHAIN: local
5
6 jobs:
7 build-default:
8 name: Build with default Git
9 strategy:
10 matrix:
11 os: [ubuntu-latest, macos-latest]
12 go: ['1.27.x']
13 runs-on: ${{ matrix.os }}
14 steps:
15 - uses: actions/checkout@v7
16 with:
17 fetch-depth: 0
18 persist-credentials: false
19 ref: ${{ github.ref }}
20 # We specify the current ref because otherwise the checkout turns
21 # annotated tags into lightweight ones, breaking "git describe".
22 # See https://github.com/actions/checkout/issues/290 and
23 # https://github.com/actions/checkout/issues/882 for details.
24 - run: sudo gem install asciidoctor
25 - uses: actions/setup-go@v7
26 with:
27 go-version: ${{ matrix.go }}
28 - run: sudo apt-get update && sudo apt-get -y install gettext libarchive-tools
29 if: ${{ startsWith(matrix.os, 'ubuntu-') }}
30 env:
31 DEBIAN_FRONTEND: noninteractive
32 - run: script/cibuild
33 env:
34 FORCE_LOCALIZE: true
35 - run: CGO_ENABLED=0 make release
36 env:
37 FORCE_LOCALIZE: true
38 - run: mkdir -p bin/assets
39 - run: find bin/releases -name "*$(uname -s | tr A-Z a-z)*" | xargs -I{} cp {} bin/assets
40 - uses: actions/upload-artifact@v7
41 with:
42 name: ${{ matrix.os }}
43 path: bin/assets
44 build-go:
45 name: Build with specific Go
46 strategy:
47 matrix:
48 go: ['1.26.x']
49 runs-on: ubuntu-latest
50 steps:
51 - uses: actions/checkout@v7
52 with:
53 fetch-depth: 0
54 persist-credentials: false
55 ref: ${{ github.ref }}
56 - uses: actions/setup-go@v7
57 with:
58 go-version: ${{ matrix.go }}
59 - run: script/cibuild
60 build-windows:
61 name: Build on Windows
62 runs-on: windows-latest
63 steps:
64 - uses: actions/checkout@v7
65 with:
66 fetch-depth: 0
67 persist-credentials: false
68 ref: ${{ github.ref }}
69 - run: gem install asciidoctor
70 - uses: actions/setup-go@v7
71 with:
72 go-version: '1.27.x'
73 - run: mkdir -p "$HOME/go/bin"
74 shell: bash
75 - run: set GOPATH=%HOME%\go
76 - run: choco install -y InnoSetup
77 - run: make man
78 shell: bash
79 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
80 shell: bash
81 - uses: git-for-windows/setup-git-for-windows-sdk@v2
82 with:
83 flavor: minimal
84 # We install the SDK so as to have access to the msgfmt.exe binary
85 # from the GNU gettext package.
86 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" script/cibuild
87 shell: bash
88 - run: rm -f commands/mancontent_gen.go
89 shell: bash
90 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=386 -B
91 shell: bash
92 env:
93 FORCE_LOCALIZE: true
94 - run: mv bin\git-lfs.exe git-lfs-x86.exe
95 - run: rm -f commands/mancontent_gen.go
96 shell: bash
97 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=amd64 -B
98 shell: bash
99 env:
100 FORCE_LOCALIZE: true
101 - run: mv bin\git-lfs.exe git-lfs-x64.exe
102 - run: rm -f commands/mancontent_gen.go
103 shell: bash
104 - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=arm64 -B
105 shell: bash
106 env:
107 FORCE_LOCALIZE: true
108 - run: mv bin\git-lfs.exe git-lfs-arm64.exe
109 - run: iscc script\windows-installer\inno-setup-git-lfs-installer.iss
110 - run: mkdir -p bin/assets
111 shell: bash
112 - run: mv *.exe bin/assets
113 shell: bash
114 - uses: actions/upload-artifact@v7
115 with:
116 name: windows-latest
117 path: bin/assets
118 build-latest:
119 name: Build with latest Git
120 strategy:
121 matrix:
122 os: [ubuntu-latest, macos-latest]
123 runs-on: ${{ matrix.os }}
124 steps:
125 - uses: actions/checkout@v7
126 with:
127 fetch-depth: 0
128 persist-credentials: false
129 ref: ${{ github.ref }}
130 - uses: actions/setup-go@v7
131 with:
132 go-version: '1.27.x'
133 - run: git clone -b master https://github.com/git/git.git "$HOME/git"
134 - run: |
135 echo "GIT_INSTALL_DIR=$HOME/git" >> "$GITHUB_ENV"
136 echo "$HOME/git/bin" >> "$GITHUB_PATH"
137 if: ${{ matrix.os == 'macos-latest' }}
138 # We install our custom Git version into a PATH location ahead of
139 # that of the Git installed by Homebrew.
140 - run: script/build-git "$HOME/git"
141 - run: GIT_DEFAULT_HASH=sha256 script/cibuild
142 build-earliest:
143 name: Build with earliest Git
144 strategy:
145 matrix:
146 os: [ubuntu-latest, macos-latest]
147 runs-on: ${{ matrix.os }}
148 steps:
149 - uses: actions/checkout@v7
150 with:
151 fetch-depth: 0
152 persist-credentials: false
153 ref: ${{ github.ref }}
154 - uses: actions/setup-go@v7
155 with:
156 go-version: '1.27.x'
157 - run: git clone -b v2.0.0 https://github.com/git/git.git "$HOME/git"
158 - run: |
159 echo "GIT_INSTALL_DIR=$HOME/git" >> "$GITHUB_ENV"
160 echo "$HOME/git/bin" >> "$GITHUB_PATH"
161 if: ${{ matrix.os == 'macos-latest' }}
162 # We install our custom Git version into a PATH location ahead of
163 # that of the Git installed by Homebrew.
164 - run: script/build-git "$HOME/git"
165 - run: script/cibuild
166 build-docker:
167 name: Build Linux packages
168 runs-on: ubuntu-latest
169 steps:
170 - uses: actions/checkout@v7
171 with:
172 fetch-depth: 0
173 persist-credentials: false
174 ref: ${{ github.ref }}
175 - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
176 - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh)
177 - run: ./docker/run_dockers.bsh --prune
178 build-docker-arm:
179 name: Build Linux ARM packages
180 runs-on: ubuntu-24.04-arm
181 steps:
182 - uses: actions/checkout@v7
183 with:
184 fetch-depth: 0
185 persist-credentials: false
186 ref: ${{ github.ref }}
187 - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
188 - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh --arch=arm64 debian_11 debian_12 debian_13)
189 - run: ./docker/run_dockers.bsh --prune --arch=arm64 debian_11 debian_12 debian_13