1010 - " llvmorg-*"
1111
1212jobs :
13- create_release :
14- name : Create release
15- runs-on : windows-latest
16- outputs :
17- upload_url : ${{ steps.create_release.outputs.upload_url }}
18- steps :
19- - name : Create Release
20- id : create_release
21- uses : actions/create-release@v1
22- env :
23- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
24- with :
25- tag_name : llvmorg-17.0.6
26- release_name : llvmorg-17.0.6
27- draft : true
28- prerelease : true
29-
30- upload_assets :
13+ build :
3114 name : Build llvm on Windows
32- needs : create_release
3315 runs-on : windows-2022
3416 strategy :
3517 matrix :
@@ -38,55 +20,59 @@ jobs:
3820 - name : Install dependency
3921 uses : crazy-max/ghaction-chocolatey@v1
4022 with :
41- args : install cmake ninja vswhere 7zip.install
23+ args : install --no-progress ninja vswhere 7zip.install
4224 - name : Upgrade dependency
4325 uses : crazy-max/ghaction-chocolatey@v1
4426 with :
45- args : upgrade llvm
46-
27+ args : upgrade --no-progress llvm
4728 - uses : GuillaumeFalourd/setup-windows10-sdk-action@v2
4829 with :
49- sdk-version : 22621
30+ sdk-version : 26100
31+
32+ - name : Checkout code
33+ uses : actions/checkout@v4
34+ - name : Ensure git safe directory
35+ run : |
36+ git config --global --add safe.directory $(pwd)
5037
51- - name : Checkout by pushing tags
38+ - name : Checkout llvm
5239 if : ${{ github.event_name == 'push' }}
53- run : git clone --branch llvmorg-17.0 .6 --depth 1 https://github.com/llvm/llvm-project.git
40+ run : git clone --quiet -- branch llvmorg-19.1 .6 --depth 1 https://github.com/llvm/llvm-project.git
5441
5542 - name : Build llvm stage 1
5643 run : |
5744 $vsPath = (vswhere -latest -property installationPath)
5845 Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
59- Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0"
46+ Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0"
47+ $prefix = "$pwd\prefix"
6048 $Env:CC = "clang-cl"
6149 $Env:CXX = "clang-cl"
62- $cmake_sys_ver = "10.0.22621.0 "
63- 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
64- cmake --build build --target package
65- Expand-Archive -Path build/*.zip -DestinationPath "$pwd"
50+ $cmake_mt = "mt "
51+ $cmake_sys_ver = "10.0.26100.0"
52+ cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DCMAKE_MT:PATH=$cmake_mt -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\llvm
53+ cmake --build build --target install
6654 Remove-Item -Recurse -Force build
6755
6856 - name : Build llvm stage 2
6957 run : |
7058 $vsPath = (vswhere -latest -property installationPath)
7159 Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
72- Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.22621.0"
73- $Env:CC = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe"
74- $Env:CXX = "$pwd\\LLVM-17.0.6-win64\\bin\\clang-cl.exe"
75- $cmake_sys_ver = "10.0.22621.0"
76- 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
77- cmake --build build --target package
60+ Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0"
61+ $prefix = "$pwd\prefix"
62+ $Env:CC = "$prefix\bin\clang-cl.exe"
63+ $Env:CXX = "$prefix\bin\clang-cl.exe"
64+ $cmake_mt = "mt"
65+ $cmake_sys_ver = "10.0.26100.0"
66+ cmake -Bbuild -GNinja -DCMAKE_SYSTEM_VERSION=$cmake_sys_ver -DCMAKE_MSVC_RUNTIME_LIBRARY=${{ matrix.rtlib }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=$prefix -DCMAKE_MT:PATH=$cmake_mt -DLLVM_TARGETS_TO_BUILD="X86" -DLLVM_ENABLE_PROJECTS="lld;clang;clang-tools-extra" -DLLVM_ENABLE_DIA_SDK=OFF llvm-project\llvm
67+ cmake --build build --target install
7868
79- - name : Repack zip package
69+ - name : Create zip package
8070 run : |
81- $name = (Get-Item build/LLVM-*.zip).Name
82- $basename = (Get-Item build/LLVM-*.zip).BaseName
83- Remove-Item -Recurse -Force "$basename"
84- Expand-Archive -Path "build/$name" -DestinationPath "$pwd"
85- Remove-Item "build/$name"
86- 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off "build/$name" "$basename"
71+ Rename-Item prefix LLVM-19.1.6-win64
72+ 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off LLVM-19.1.6-win64-${{ matrix.rtlib }}.zip LLVM-19.1.6-win64
8773
88- - name : Upload LLVM zip package
74+ - name : Create release and Upload LLVM zip package
8975 env :
9076 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9177 run : |
92- gh release upload LLVM-17.0 .6-win64-${{ matrix.rtlib }}.zip build/*.zip --clobber
78+ gh release create --draft --prerelease --notes-from-tag llvmorg-19.1.6 $pwd\ LLVM-19.1 .6-win64-${{ matrix.rtlib }}.zip
0 commit comments