|
23 | 23 | BUILD_ONLY: "${{github.event.inputs.build_only}}"
|
24 | 24 | REPOSITORY: "${{github.event.inputs.repository}}"
|
25 | 25 | REF: "${{github.event.inputs.ref}}"
|
| 26 | + LLVM_VERSION: 20211002 |
| 27 | + LLVM_TYPE: msvcrt |
| 28 | + VCPKG_VERSION_FOR_CACHE: 1 |
26 | 29 |
|
27 | 30 | jobs:
|
28 | 31 | bundle-artifacts:
|
@@ -200,9 +203,9 @@ jobs:
|
200 | 203 | printf '#!/bin/sh\n\nexec /mingw64/bin/git.exe "$@"\n' >/usr/bin/git &&
|
201 | 204 |
|
202 | 205 | # Restrict `PATH` to MSYS2 and to Visual Studio (to let `cv2pdb` find the relevant DLLs)
|
203 |
| - PATH="/mingw64/bin:/usr/bin:/C/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin${{matrix.arch.bin}}:/C/Windows/system32" |
| 206 | + PATH="/mingw64/bin:/usr/bin:/C/Windows/system32" |
204 | 207 |
|
205 |
| - type -p mspdb140.dll || exit 1 |
| 208 | + # type -p mspdb140.dll || exit 1 |
206 | 209 | sh -x /usr/src/build-extra/please.sh build-mingw-w64-git --only-${{matrix.arch.bitness}}-bit --build-src-pkg -o artifacts HEAD &&
|
207 | 210 | cp bundle-artifacts/ver artifacts/ &&
|
208 | 211 | if test -n "$GPGKEY"
|
@@ -268,43 +271,85 @@ jobs:
|
268 | 271 | git remote add -f origin https://github.com/git-for-windows/git &&
|
269 | 272 | git fetch --tags bundle-artifacts/git.bundle $(cat bundle-artifacts/next_version) &&
|
270 | 273 | git reset --hard $(cat bundle-artifacts/next_version)
|
271 |
| - - name: initialize vcpkg |
| 274 | + - name: Set LLVM path |
272 | 275 | if: env.SKIP != 'true'
|
273 |
| - uses: actions/checkout@v2 |
| 276 | + shell: bash |
| 277 | + run: echo "LLVM_PATH=`pwd`/llvm-build/llvm-mingw-${{ env.LLVM_VERSION }}-${{ env.LLVM_TYPE }}-x86_64" >> $GITHUB_ENV |
| 278 | + - name: Cache LLVM |
| 279 | + if: env.SKIP != 'true' |
| 280 | + id: cache-llvm |
| 281 | + uses: actions/cache@v2 |
274 | 282 | with:
|
275 |
| - repository: 'microsoft/vcpkg' |
276 |
| - path: 'compat/vcbuild/vcpkg' |
277 |
| - - name: download vcpkg artifacts |
| 283 | + path: llvm-build |
| 284 | + key: llvm-build-${{ env.LLVM_VERSION }}-${{ env.LLVM_TYPE }} |
| 285 | + - shell: pwsh |
| 286 | + if: steps.cache-llvm.outputs.cache-hit != 'true' && env.SKIP != 'true' |
| 287 | + run: | |
| 288 | + Invoke-WebRequest -Uri "https://github.com/mstorsjo/llvm-mingw/releases/download/${{ env.LLVM_VERSION }}/llvm-mingw-${{ env.LLVM_VERSION }}-${{ env.LLVM_TYPE }}-x86_64.zip" -OutFile "./llvm.zip" |
| 289 | + Expand-Archive -LiteralPath './llvm.zip' -DestinationPath ./llvm-build |
| 290 | + - name: Setup MSYS2 |
278 | 291 | if: env.SKIP != 'true'
|
279 |
| - uses: git-for-windows/get-azure-pipelines-artifact@v0 |
| 292 | + uses: msys2/setup-msys2@v2 |
280 | 293 | with:
|
281 |
| - repository: git/git |
282 |
| - definitionId: 9 |
283 |
| - - name: add msbuild to PATH |
| 294 | + msystem: MSYS |
| 295 | + - name: Add clangarm64 server |
284 | 296 | if: env.SKIP != 'true'
|
285 |
| - uses: microsoft/setup-msbuild@v1 |
286 |
| - - name: copy dlls to root |
| 297 | + shell: msys2 {0} |
| 298 | + run: | |
| 299 | + cat <<EOF >> /etc/pacman.conf |
| 300 | + [clangarm64] |
| 301 | + Server = https://mirror.msys2.org/mingw/clangarm64/ |
| 302 | + EOF |
| 303 | + - name: Update package database with arm64 entries |
287 | 304 | if: env.SKIP != 'true'
|
288 |
| - shell: powershell |
| 305 | + shell: msys2 {0} |
| 306 | + run: pacman -Sy |
| 307 | + - name: Install packages |
| 308 | + if: env.SKIP != 'true' |
| 309 | + shell: msys2 {0} |
289 | 310 | run: |
|
290 |
| - & compat\vcbuild\vcpkg_copy_dlls.bat release arm64-windows |
291 |
| - if (!$?) { exit(1) } |
292 |
| - - name: generate Visual Studio solution |
| 311 | + pacman -S --noconfirm mingw-w64-clang-aarch64-openssl mingw-w64-clang-aarch64-zlib \ |
| 312 | + mingw-w64-clang-aarch64-curl mingw-w64-clang-aarch64-expat \ |
| 313 | + mingw-w64-clang-aarch64-libiconv mingw-w64-clang-aarch64-toolchain |
| 314 | + - name: Set MSYS2 root as env variable |
293 | 315 | if: env.SKIP != 'true'
|
294 |
| - shell: bash |
| 316 | + shell: msys2 {0} |
| 317 | + run: echo "MSYS_ROOT=$(cygpath -m /)" >> $GITHUB_ENV |
| 318 | + - shell: bash |
| 319 | + if: env.SKIP != 'true' |
| 320 | + # We need to remove mingw32-make.exe (which is arm64-native) as it clashes with cmake |
295 | 321 | run: |
|
296 |
| - cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=`pwd`/compat/vcbuild/vcpkg/installed/arm64-windows \ |
297 |
| - -DNO_GETTEXT=YesPlease -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON -DCMAKE_GENERATOR_PLATFORM=arm64 -DVCPKG_ARCH=arm64-windows \ |
298 |
| - -DCMAKE_INSTALL_PREFIX="`pwd`/git-arm64" -DSKIP_DASHED_BUILT_INS=ON -DHOST_CPU=arm64 |
299 |
| - - name: MSBuild |
| 322 | + rm ${{ env.MSYS_ROOT }}clangarm64/bin/mingw32-make.exe |
| 323 | + mkdir `pwd`/git-arm64 |
| 324 | + cmake `pwd`/contrib/buildsystems/ -DCMAKE_PREFIX_PATH=${{ env.MSYS_ROOT }}clangarm64 -DNO_GETTEXT=YesPlease \ |
| 325 | + -DPERL_TESTS=OFF -DPYTHON_TESTS=OFF -DCURL_NO_CURL_CMAKE=ON \ |
| 326 | + -DCMAKE_C_COMPILER=${{ env.LLVM_PATH }}/bin/aarch64-w64-mingw32-clang.exe \ |
| 327 | + -DCMAKE_CXX_COMPILER=${{ env.LLVM_PATH }}/bin/aarch64-w64-mingw32-clang++.exe \ |
| 328 | + -DCMAKE_RC_COMPILER=${{ env.LLVM_PATH }}/bin/aarch64-w64-mingw32-windres.exe \ |
| 329 | + -DCMAKE_INSTALL_PREFIX=`pwd`/git-arm64 -DSKIP_DASHED_BUILT_INS=ON -DHOST_CPU=arm64 -DUSE_VCPKG=OFF -G "MinGW Makefiles" |
| 330 | + - shell: pwsh |
300 | 331 | if: env.SKIP != 'true'
|
301 |
| - run: msbuild git.sln -property:Configuration=Release |
302 |
| - - name: Link the Git executables |
| 332 | + run: make -j2 |
| 333 | + - shell: pwsh |
303 | 334 | if: env.SKIP != 'true'
|
304 |
| - run: msbuild INSTALL.vcxproj -property:Configuration=Release |
| 335 | + run: make install |
| 336 | + # Workaround to get the DLLs into the installation directory |
| 337 | + - name: Copy DLLs |
| 338 | + if: env.SKIP != 'true' |
| 339 | + shell: msys2 {0} |
| 340 | + run: | |
| 341 | + DLLS="libbrotlicommon.dll libbrotlidec.dll libcrypto-1_1.dll libcurl-4.dll libexpat-1.dll \ |
| 342 | + libiconv-2.dll libidn2-0.dll libintl-8.dll libnghttp2-14.dll libpsl-5.dll libssh2-1.dll \ |
| 343 | + libssl-1_1.dll libunistring-2.dll libwinpthread-1.dll libzstd.dll zlib1.dll" |
| 344 | +
|
| 345 | + for ITEM in ${DLLS} |
| 346 | + do |
| 347 | + cp /clangarm64/bin/${ITEM} `pwd`/git-arm64/bin |
| 348 | + cp /clangarm64/bin/${ITEM} `pwd`/git-arm64/libexec/git-core |
| 349 | + done |
305 | 350 | - name: upload build artifacts
|
306 | 351 | if: env.SKIP != 'true'
|
307 |
| - uses: actions/upload-artifact@v1 |
| 352 | + uses: actions/upload-artifact@v2 |
308 | 353 | with:
|
309 | 354 | name: arm64-artifacts
|
310 | 355 | path: ./git-arm64
|
@@ -433,7 +478,7 @@ jobs:
|
433 | 478 | fi &&
|
434 | 479 | openssl dgst -sha256 artifacts/${{matrix.artifact.fileprefix}}-*.${{matrix.artifact.fileextension}} | sed "s/.* //" >artifacts/sha-256.txt
|
435 | 480 | - name: Copy package-versions and pdbs
|
436 |
| - if: env.SKIP != 'true' && matrix.artifact.name == 'installer' |
| 481 | + if: env.SKIP != 'true' && matrix.artifact.name == 'installer' && 'skipThisForNow' == 'dummy' |
437 | 482 | shell: bash
|
438 | 483 | run: |
|
439 | 484 | cp /usr/src/build-extra/installer/package-versions.txt artifacts/ &&
|
|
0 commit comments