forked from git-lfs/git-lfs
-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (155 loc) · 4.84 KB
/
ci.yml
File metadata and controls
156 lines (155 loc) · 4.84 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: CI
on: [push, pull_request]
jobs:
build-default:
name: Build with default Git
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
go: ['1.19.x']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: brew install gettext
if: ${{ startsWith(matrix.os, 'macos-') }}
- run: sudo apt-get update && sudo apt-get -y install gettext libarchive-tools
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
env:
DEBIAN_FRONTEND: noninteractive
- run: gem install asciidoctor
- run: script/cibuild
env:
FORCE_LOCALIZE: true
- run: CGO_ENABLED=0 make release
env:
FORCE_LOCALIZE: true
- run: mkdir -p bin/assets
- run: find bin/releases -name "*$(uname -s | tr A-Z a-z)*" | xargs -I{} cp {} bin/assets
- uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}
path: bin/assets
build-go:
name: Build with specific Go
strategy:
matrix:
go: ['1.18.x']
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- run: script/cibuild
build-windows:
name: Build on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- uses: actions/setup-go@v2
with:
go-version: '1.19.x'
- run: mkdir -p "$HOME/go/bin"
shell: bash
- run: set GOPATH=%HOME%\go
- run: cinst InnoSetup -y
- run: cinst strawberryperl -y
- run: refreshenv
- run: gem install asciidoctor
shell: bash
- run: make man
shell: bash
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
shell: bash
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" script/cibuild
shell: bash
- run: rm -f commands/mancontent_gen.go
shell: bash
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=386 -B
shell: bash
env:
FORCE_LOCALIZE: true
- run: mv bin\git-lfs.exe git-lfs-x86.exe
- run: rm -f commands/mancontent_gen.go
shell: bash
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=amd64 -B
shell: bash
env:
FORCE_LOCALIZE: true
- run: mv bin\git-lfs.exe git-lfs-x64.exe
- run: rm -f commands/mancontent_gen.go
shell: bash
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" make GOARCH=arm64 -B
shell: bash
env:
FORCE_LOCALIZE: true
- run: mv bin\git-lfs.exe git-lfs-arm64.exe
- run: iscc script\windows-installer\inno-setup-git-lfs-installer.iss
- run: mkdir -p bin/assets
shell: bash
- run: mv *.exe bin/assets
shell: bash
- uses: actions/upload-artifact@v1
with:
name: windows-latest
path: bin/assets
build-latest:
name: Build with latest Git
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- run: git clone -b master https://github.com/git/git.git "$HOME/git"
- run: script/build-git "$HOME/git"
- run: GIT_DEFAULT_HASH=sha256 script/cibuild
build-earliest:
name: Build with earliest Git
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- run: git clone -b v2.0.0 https://github.com/git/git.git "$HOME/git"
- run: script/build-git "$HOME/git"
- run: script/cibuild
build-docker:
name: Build Linux packages
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
- run: (cd "$HOME/build-dockers" && ./build_dockers.bsh)
- run: ./docker/run_dockers.bsh --prune
build-docker-cross:
name: Build Cross Linux packages
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [arm64]
container: [debian_11]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-ruby@v1
- run: |
echo '{"experimental": true}' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker.service
docker version -f '{{.Server.Experimental}}'
- uses: docker/setup-qemu-action@v1
- run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers"
- run: (cd "$HOME/build-dockers" && ./build_dockers.bsh --arch=$ARCH $CONTAINER)
env:
ARCH: ${{matrix.arch}}
CONTAINER: ${{matrix.container}}
- run: ./docker/run_dockers.bsh --prune --arch=$ARCH $CONTAINER
env:
ARCH: ${{matrix.arch}}
CONTAINER: ${{matrix.container}}