diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2d90c8..2c840bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,53 +25,41 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-11, windows-2019, ubuntu-20.04] - arch: [x86, x64] + os: [macos-latest, windows-latest, ubuntu-20.04] + arch: [x64, arm64] include: - - os: macos-11 + - os: macos-latest friendlyName: macOS targetPlatform: macOS - - os: macos-11 - friendlyName: macOS - targetPlatform: macOS - arch: arm64 - - os: windows-2019 + - os: windows-latest friendlyName: Windows targetPlatform: win32 - os: ubuntu-20.04 friendlyName: Linux targetPlatform: ubuntu - - os: ubuntu-20.04 - friendlyName: Linux - targetPlatform: ubuntu - arch: arm64 - - os: ubuntu-20.04 - friendlyName: Linux - targetPlatform: ubuntu - arch: arm exclude: - - os: macos-11 - arch: x86 - - os: windows-2019 - arch: x86 + - os: windows-latest + arch: arm64 timeout-minutes: 20 steps: - # We need to use Xcode 11.7 for maximum compatibility with older macOS (x64) - - name: Switch to Xcode 11.7 + # We need to use Xcode 14.3 for maximum compatibility with older macOS (x64) + - name: Switch to oldest available Xcode if: matrix.targetPlatform == 'macOS' && matrix.arch == 'x64' run: | - sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer/ + sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer/ # Delete the command line tools to make sure they don't get our builds - # messed up with macOS SDK 11 stuff. + # messed up with macOS SDK stuff. sudo rm -rf /Library/Developer/CommandLineTools - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: recursive # Needed for script/package.sh to work fetch-depth: 0 - name: Install go if: matrix.targetPlatform == 'macOS' - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 + with: + go-version: 'stable' - name: Install dependencies run: npm install - name: Check formatting @@ -83,12 +71,6 @@ jobs: run: | sudo apt-get update sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext - - name: Install extra dependencies for building Git on Ubuntu (x86) - if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'x86' - run: | - sudo dpkg --add-architecture i386 - sudo apt-get update - sudo apt-get install gcc-i686-linux-gnu binutils-i686-gnu libcurl4-gnutls-dev:i386 zlib1g-dev:i386 gettext - name: Install extra dependencies for building Git on Ubuntu (arm64) if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'arm64' run: | @@ -98,24 +80,7 @@ jobs: sudo dpkg --add-architecture arm64 sudo apt-get update sudo apt-get install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libcurl4-gnutls-dev:arm64 zlib1g-dev:arm64 gettext - - name: Install extra dependencies for building Git on Ubuntu (arm) - if: matrix.targetPlatform == 'ubuntu' && matrix.arch == 'arm' - run: | - sudo sed -i "s/^deb/deb [arch=amd64,i386]/g" /etc/apt/sources.list - echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ $(lsb_release -s -c) main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list - echo "deb [arch=arm64,armhf] http://azure.ports.ubuntu.com/ $(lsb_release -s -c)-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list - sudo dpkg --add-architecture armhf - sudo apt-get update - sudo apt-get install gcc-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libcurl4-gnutls-dev:armhf zlib1g-dev:armhf gettext - - name: Build (except macOS arm64) - if: matrix.targetPlatform != 'macOS' || matrix.arch != 'arm64' - shell: bash - run: script/build.sh - env: - TARGET_PLATFORM: ${{ matrix.targetPlatform }} - TARGET_ARCH: ${{ matrix.arch }} - - name: Build (macOS arm64) - if: matrix.targetPlatform == 'macOS' && matrix.arch == 'arm64' + - name: Build shell: bash run: script/build.sh env: diff --git a/dependencies.json b/dependencies.json index ef39222..cc6deb4 100644 --- a/dependencies.json +++ b/dependencies.json @@ -1,13 +1,13 @@ { "git": { - "version": "v2.44.1", + "version": "v2.45.2", "packages": [ { "platform": "windows", "arch": "amd64", - "filename": "PortableGit-2.44.1-64-bit.7z.exe", - "url": "https://github.com/git-for-windows/git/releases/download/v2.44.1.windows.1/PortableGit-2.44.1-64-bit.7z.exe", - "checksum": "1300ebcd98e91df53f4a0af9bfd955450f7a362aa1e8f6126eb2aa437bf7e497" + "filename": "PortableGit-2.45.2-64-bit.7z.exe", + "url": "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/PortableGit-2.45.2-64-bit.7z.exe", + "checksum": "851a15074dea6b272785b2a2a4697a72970256de2afe7b8e4a9c5e168c27ccdd" } ] }, @@ -20,30 +20,12 @@ "name": "git-lfs-linux-amd64-v3.5.1.tar.gz", "checksum": "6f28eb19faa7a968882dca190d92adc82493378b933958d67ceaeb9ebe4d731e" }, - { - "platform": "linux", - "arch": "x86", - "name": "git-lfs-linux-386-v3.5.1.tar.gz", - "checksum": "4436bbc404427b2ca24108582cb1945dd806851d8634d287b8f37fb211718bee" - }, { "platform": "linux", "arch": "arm64", "name": "git-lfs-linux-arm64-v3.5.1.tar.gz", "checksum": "4f8700aacaa0fd26ae5300fb0996aed14d1fd0ce1a63eb690629c132ff5163a9" }, - { - "platform": "linux", - "arch": "arm", - "name": "git-lfs-linux-arm-v3.5.1.tar.gz", - "checksum": "03923d8badf5c382920390414ad7084c5d87b246b180474d09961e3831f552e2" - }, - { - "platform": "windows", - "arch": "x86", - "name": "git-lfs-windows-386-v3.5.1.zip", - "checksum": "ea5138789c4f19ed71d30c3e407f43bd270771028d37e5292378a8ea2c154377" - }, { "platform": "windows", "arch": "amd64", diff --git a/git b/git index 10dc984..bea9ecd 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 10dc9846b82b5f4927d57c6bb657a9352121bebf +Subproject commit bea9ecd24b0c3bf06cab4a851694fe09e7e51408 diff --git a/script/build-macos.sh b/script/build-macos.sh index be14a76..d4856ab 100755 --- a/script/build-macos.sh +++ b/script/build-macos.sh @@ -5,14 +5,13 @@ set -eu -o pipefail -MACOSX_BUILD_VERSION="10.9" +MACOSX_BUILD_VERSION="10.15" +HOST_CPU=arm64 if [ "$TARGET_ARCH" = "x64" ]; then - HOST_CPU=x86_64 TARGET_CFLAGS="-target x86_64-apple-darwin" GOARCH=amd64 else - HOST_CPU=arm64 TARGET_CFLAGS="-target arm64-apple-darwin" GOARCH=arm64 fi @@ -76,16 +75,7 @@ if [[ "$GIT_LFS_VERSION" ]]; then git clone -b "v$GIT_LFS_VERSION" "https://github.com/git-lfs/git-lfs" ( cd git-lfs - - # HACK: When cross-compiling, there seems to be an issue when git-lfs attempts - # to generate the manpage contents, and it seems that preffixing that command - # with `GOARCH=` to use the host architecture fixes the issue. - # This hack can be removed once the issue is fixed via the PR - # https://github.com/git-lfs/git-lfs/pull/4492 or some other solution. - GO_GENERATE_STRING="\$(GO) generate github.com\/git-lfs\/git-lfs\/commands" - sed -i -e "s/$GO_GENERATE_STRING/GOARCH= $GO_GENERATE_STRING/" Makefile - - make GOARCH="$GOARCH" CGO_CFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" CGO_LDFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" BUILTIN_LD_FLAGS="-linkmode external" + make GOARCH="$GOARCH" CGO_ENABLED=1 CGO_CFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" CGO_LDFLAGS="-mmacosx-version-min=$MACOSX_BUILD_VERSION" BUILTIN_LD_FLAGS="-linkmode external" ) GIT_LFS_BINARY_PATH="git-lfs/bin/git-lfs" if test -f "$GIT_LFS_BINARY_PATH"; then diff --git a/script/generate-release-notes.ts b/script/generate-release-notes.ts index 4a9cb48..0a21b16 100644 --- a/script/generate-release-notes.ts +++ b/script/generate-release-notes.ts @@ -4,10 +4,10 @@ import * as fs from 'fs' import { Octokit } from '@octokit/rest' export default class GenerateReleaseNotes { - // seven targeted OS/arch combinations + // five targeted OS/arch combinations // two files for each targeted OS/arch // two checksum files for the previous - private SUCCESSFUL_RELEASE_FILE_COUNT = 7 * 2 * 2 + private SUCCESSFUL_RELEASE_FILE_COUNT = 5 * 2 * 2 private args = process.argv.slice(2) private expectedArgs = [ { diff --git a/script/update-git-lfs.ts b/script/update-git-lfs.ts index 288e686..e7914e7 100644 --- a/script/update-git-lfs.ts +++ b/script/update-git-lfs.ts @@ -24,15 +24,9 @@ function getArch(fileName: string) { if (fileName.match(/-amd64-/)) { return 'amd64' } - if (fileName.match(/-386-/)) { - return 'x86' - } if (fileName.match(/-arm64-/)) { return 'arm64' } - if (fileName.match(/-arm-/)) { - return 'arm' - } throw new Error(`Unable to find arch for file: ${fileName}`) } @@ -88,10 +82,7 @@ async function run(): Promise { const files = [ `git-lfs-linux-amd64-${version}.tar.gz`, - `git-lfs-linux-386-${version}.tar.gz`, `git-lfs-linux-arm64-${version}.tar.gz`, - `git-lfs-linux-arm-${version}.tar.gz`, - `git-lfs-windows-386-${version}.zip`, `git-lfs-windows-amd64-${version}.zip`, ]