diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14ba5c9..ab626b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,56 +25,78 @@ jobs: - name: Install dependency uses: crazy-max/ghaction-chocolatey@v1 with: - args: install cmake ninja vswhere 7zip.install + args: install --no-progress ninja vswhere 7zip.install - name: Upgrade dependency uses: crazy-max/ghaction-chocolatey@v1 with: - args: upgrade llvm + args: upgrade --no-progress llvm - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 with: - sdk-version: 22621 + sdk-version: 26100 - - name: Checkout by pushing tags - run: git clone --branch llvmorg-17.0.6 --depth 1 https://github.com/llvm/llvm-project.git + - name: Checkout libxml2 + run: git clone --quiet --branch v2.13.5 --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git + + - name: Build libxml2 + run: | + $vsPath = (vswhere -latest -property installationPath) + Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" + $Env:CC = "clang-cl" + $Env:CXX = "clang-cl" + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLIBXML2_WITH_ICONV=OFF libxml2 + cmake --build build --target install + Remove-Item -Recurse build + + - name: Checkout llvm + run: git clone --quiet --branch llvmorg-19.1.6 --depth 1 https://github.com/llvm/llvm-project.git - name: Build llvm stage 1 run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" $Env:CC = "clang-cl" $Env:CXX = "clang-cl" - $cmake_sys_ver = "10.0.22621.0" - cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm cmake --build build --target package - Expand-Archive -Path build/*.zip -DestinationPath "$pwd" + $name = (Get-Item build\LLVM-*.zip).Name + $basename = (Get-Item build\LLVM-*.zip).BaseName + Expand-Archive -Path build\$name -DestinationPath $pwd + Copy-Item $prefix\bin\libxml2.dll $pwd\$basename\bin\libxml2.dll Remove-Item -Recurse -Force build - name: Build llvm stage 2 run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" - $Env:CC = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe" - $Env:CXX = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe" - $cmake_sys_ver = "10.0.22621.0" - cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" + $Env:CC = "$pwd\LLVM-19.1.6-win64\bin\clang-cl.exe" + $Env:CXX = "$pwd\LLVM-19.1.6-win64\bin\clang-cl.exe" + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm cmake --build build --target package - name: Repack zip package run: | - $name = (Get-Item build/LLVM-*.zip).Name - $basename = (Get-Item build/LLVM-*.zip).BaseName - Remove-Item -Recurse -Force "$basename" - Expand-Archive -Path "build/$name" -DestinationPath "$pwd" - Remove-Item "build/$name" - 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename" + $name = (Get-Item build\LLVM-*.zip).Name + $basename = (Get-Item build\LLVM-*.zip).BaseName + Remove-Item -Recurse -Force $basename + Expand-Archive -Path build\$name -DestinationPath $pwd + Remove-Item build\$name + Copy-Item $pwd\prefix\bin\libxml2.dll $basename\bin\libxml2.dll + 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off build\$name $basename - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: llvm-${{ matrix.rtlib }} - path: build/*.zip + path: build\*.zip retention-days: 14 compression-level: 0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6e5d0f5..cef1a2b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,8 +22,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: llvmorg-17.0.6 - release_name: llvmorg-17.0.6 + tag_name: llvmorg-19.1.6 + release_name: llvmorg-19.1.6 draft: true prerelease: true @@ -38,55 +38,77 @@ jobs: - name: Install dependency uses: crazy-max/ghaction-chocolatey@v1 with: - args: install cmake ninja vswhere 7zip.install + args: install --no-progress ninja vswhere 7zip.install - name: Upgrade dependency uses: crazy-max/ghaction-chocolatey@v1 with: - args: upgrade llvm + args: upgrade --no-progress llvm - uses: GuillaumeFalourd/setup-windows10-sdk-action@v2 with: - sdk-version: 22621 + sdk-version: 26100 - - name: Checkout by pushing tags + - name: Checkout libxml2 + run: git clone --quiet --branch v2.13.5 --depth 1 https://gitlab.gnome.org/GNOME/libxml2.git + + - name: Build libxml2 + run: | + $vsPath = (vswhere -latest -property installationPath) + Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" + $Env:CC = "clang-cl" + $Env:CXX = "clang-cl" + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLIBXML2_WITH_ICONV=OFF libxml2 + cmake --build build --target install + Remove-Item -Recurse build + + - name: Checkout llvm if: ${{ github.event_name == 'push' }} - run: git clone --branch llvmorg-17.0.6 --depth 1 https://github.com/llvm/llvm-project.git + run: git clone --quiet --branch llvmorg-19.1.6 --depth 1 https://github.com/llvm/llvm-project.git - name: Build llvm stage 1 run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" $Env:CC = "clang-cl" $Env:CXX = "clang-cl" - $cmake_sys_ver = "10.0.22621.0" - cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm cmake --build build --target package - Expand-Archive -Path build/*.zip -DestinationPath "$pwd" + $name = (Get-Item build\LLVM-*.zip).Name + $basename = (Get-Item build\LLVM-*.zip).BaseName + Expand-Archive -Path build\$name -DestinationPath $pwd + Copy-Item $prefix\bin\libxml2.dll $pwd\$basename\bin\libxml2.dll Remove-Item -Recurse -Force build - name: Build llvm stage 2 run: | $vsPath = (vswhere -latest -property installationPath) Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll") - Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0" - $Env:CC = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe" - $Env:CXX = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe" - $cmake_sys_ver = "10.0.22621.0" - cmake -Bbuild -GNinja "-DCMAKE_SYSTEM_VERSION=$cmake_sys_ver" -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP "-DCMAKE_INSTALL_PREFIX=$pwd\\prefix" -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\\llvm + Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0" + $Env:CC = "$pwd\LLVM-19.1.6-win64\bin\clang-cl.exe" + $Env:CXX = "$pwd\LLVM-19.1.6-win64\bin\clang-cl.exe" + $cmake_sys_ver = "10.0.26100.0" + $prefix = "$pwd\prefix" + cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=ZIP -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF -DLLVM_ENABLE_LIBXML2=FORCE_ON -DLIBXML2_INCLUDE_DIR:PATH="$prefix\include\libxml2" -DLIBXML2_LIBRARY:FILEPATH="$prefix\lib\libxml2.lib" llvm-project\llvm cmake --build build --target package - name: Repack zip package run: | - $name = (Get-Item build/LLVM-*.zip).Name - $basename = (Get-Item build/LLVM-*.zip).BaseName - Remove-Item -Recurse -Force "$basename" - Expand-Archive -Path "build/$name" -DestinationPath "$pwd" - Remove-Item "build/$name" - 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename" + $name = (Get-Item build\LLVM-*.zip).Name + $basename = (Get-Item build\LLVM-*.zip).BaseName + Remove-Item -Recurse -Force $basename + Expand-Archive -Path build\$name -DestinationPath $pwd + Remove-Item build\$name + Copy-Item $pwd\prefix\bin\libxml2.dll $basename\bin\libxml2.dll + 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off build\$name $basename - name: Upload LLVM zip package env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release upload LLVM-17.0.6-win64-${{ matrix.rtlib }}.zip build/*.zip --clobber + gh release upload LLVM-19.1.6-win64-${{ matrix.rtlib }}.zip build\*.zip --clobber