t/t-push.sh: add push test with multiple tags #680
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
env: | |
GOTOOLCHAIN: local | |
jobs: | |
build-default: | |
name: Build with default Git | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
go: ['1.23.x'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
# We update the current tag as the checkout step turns annotated tags | |
# into lightweight ones by accident, breaking "git describe". | |
# See https://github.com/actions/checkout/issues/882 for details. | |
- uses: ruby/setup-ruby@v1 | |
- run: gem install asciidoctor | |
- uses: actions/setup-go@v5 | |
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: 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@v4 | |
with: | |
name: ${{ matrix.os }} | |
path: bin/assets | |
build-go: | |
name: Build with specific Go | |
strategy: | |
matrix: | |
go: ['1.22.x'] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- run: script/cibuild | |
build-windows: | |
name: Build on Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
shell: bash | |
- uses: ruby/setup-ruby@v1 | |
- run: gem install asciidoctor | |
- run: Rename-Item -Path C:\msys64 -NewName msys64-tmp -Force | |
# We move the MSYS2 installed for Ruby aside to prevent use of its Git, | |
# which does not honour the PATH we set to our built git-lfs binary. | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.x' | |
- run: mkdir -p "$HOME/go/bin" | |
shell: bash | |
- run: set GOPATH=%HOME%\go | |
- run: choco install -y InnoSetup | |
- run: choco install -y strawberryperl | |
- 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 | |
- uses: git-for-windows/setup-git-for-windows-sdk@v1 | |
with: | |
flavor: minimal | |
# We install the SDK so as to have access to the msgfmt.exe binary | |
# from the GNU gettext package. | |
- run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" env -u TMPDIR script/cibuild | |
shell: bash | |
# We clear the TMPDIR set for Ruby so mktemp and Go use the same | |
# volume for temporary files. | |
- 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@v4 | |
with: | |
name: windows-latest | |
path: bin/assets | |
build-latest: | |
name: Build with latest Git | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.x' | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
- run: git clone -b master https://github.com/git/git.git "$HOME/git" | |
- run: | | |
echo "GIT_INSTALL_DIR=$HOME/git" >> "$GITHUB_ENV" | |
echo "$HOME/git/bin" >> "$GITHUB_PATH" | |
if: ${{ matrix.os == 'macos-latest' }} | |
# We install our custom Git version into a PATH location ahead of | |
# that of the Git installed by Homebrew. | |
- run: script/build-git "$HOME/git" | |
- run: GIT_DEFAULT_HASH=sha256 script/cibuild | |
build-earliest: | |
name: Build with earliest Git | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.x' | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
- run: git clone -b v2.0.0 https://github.com/git/git.git "$HOME/git" | |
- run: | | |
echo "GIT_INSTALL_DIR=$HOME/git" >> "$GITHUB_ENV" | |
echo "$HOME/git/bin" >> "$GITHUB_PATH" | |
if: ${{ matrix.os == 'macos-latest' }} | |
# We install our custom Git version into a PATH location ahead of | |
# that of the Git installed by Homebrew. | |
- run: script/build-git "$HOME/git" | |
- run: script/cibuild | |
build-docker: | |
name: Build Linux packages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
- uses: ruby/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-latest | |
strategy: | |
matrix: | |
arch: [arm64] | |
container: [debian_12] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: git fetch origin "+${GITHUB_REF}:${GITHUB_REF}" | |
if: ${{ github.ref_type == 'tag' }} | |
- uses: ruby/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@v3 | |
- 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}} |