10
10
- " llvmorg-*"
11
11
12
12
jobs :
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 :
31
14
name : Build llvm on Windows
32
- needs : create_release
33
15
runs-on : windows-2022
34
16
strategy :
35
17
matrix :
@@ -38,55 +20,59 @@ jobs:
38
20
- name : Install dependency
39
21
uses : crazy-max/ghaction-chocolatey@v1
40
22
with :
41
- args : install cmake ninja vswhere 7zip.install
23
+ args : install --no-progress ninja vswhere 7zip.install
42
24
- name : Upgrade dependency
43
25
uses : crazy-max/ghaction-chocolatey@v1
44
26
with :
45
- args : upgrade llvm
46
-
27
+ args : upgrade --no-progress llvm
47
28
- uses : GuillaumeFalourd/setup-windows10-sdk-action@v2
48
29
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)
50
37
51
- - name : Checkout by pushing tags
38
+ - name : Checkout llvm
52
39
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
54
41
55
42
- name : Build llvm stage 1
56
43
run : |
57
44
$vsPath = (vswhere -latest -property installationPath)
58
45
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"
60
48
$Env:CC = "clang-cl"
61
49
$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
66
54
Remove-Item -Recurse -Force build
67
55
68
56
- name : Build llvm stage 2
69
57
run : |
70
58
$vsPath = (vswhere -latest -property installationPath)
71
59
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
78
68
79
69
- name : Repack zip package
80
70
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-win6
87
73
88
- - name : Upload LLVM zip package
74
+ - name : Create release and Upload LLVM zip package
89
75
env :
90
76
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91
77
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 ${{ github.event.release.tag_name }} LLVM- *.zip
0 commit comments