9
9
tags :
10
10
- " llvmorg-*"
11
11
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 :
12
+ jobs
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,54 @@ 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
27
+ args : upgrade --no-progress llvm
46
28
47
29
- uses : GuillaumeFalourd/setup-windows10-sdk-action@v2
48
30
with :
49
- sdk-version : 22621
31
+ sdk-version : 26100
50
32
51
- - name : Checkout by pushing tags
33
+ - name : Checkout llvm
52
34
if : ${{ github.event_name == 'push' }}
53
- run : git clone --branch llvmorg-17.0 .6 --depth 1 https://github.com/llvm/llvm-project.git
35
+ run : git clone --quiet -- branch llvmorg-19.1 .6 --depth 1 https://github.com/llvm/llvm-project.git
54
36
55
37
- name : Build llvm stage 1
56
38
run : |
57
39
$vsPath = (vswhere -latest -property installationPath)
58
40
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"
41
+ Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0"
42
+ $prefix = "$pwd\prefix"
60
43
$Env:CC = "clang-cl"
61
44
$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"
45
+ $cmake_mt = "mt "
46
+ $cmake_sys_ver = "10.0.26100.0"
47
+ 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
48
+ cmake --build build --target install
66
49
Remove-Item -Recurse -Force build
67
50
68
51
- name : Build llvm stage 2
69
52
run : |
70
53
$vsPath = (vswhere -latest -property installationPath)
71
54
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
55
+ Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.26100.0"
56
+ $prefix = "$pwd\prefix"
57
+ $Env:CC = "$prefix\bin\clang-cl.exe"
58
+ $Env:CXX = "$prefix\bin\clang-cl.exe"
59
+ $cmake_mt = "mt"
60
+ $cmake_sys_ver = "10.0.26100.0"
61
+ 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
62
+ cmake --build build --target install
78
63
79
64
- name : Repack zip package
80
65
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"
66
+ Rename-Item prefix LLVM-19.1.6-win64
67
+ 7z a -mx=9 -tzip -mtm=off -mtc=off -mta=off LLVM-19.1.6-win64-${{ matrix.rtlib }}.zip LLVM-19.1.6-win64
87
68
88
- - name : Upload LLVM zip package
69
+ - name : Create release and Upload LLVM zip package
89
70
env :
90
71
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
91
72
run : |
92
- gh release upload LLVM-17.0.6-win64- ${{ matrix.rtlib }}.zip build/ *.zip --clobber
73
+ gh release create --draft --prerelease --notes-from-tag ${{ github.event.release.tag_name }} LLVM- *.zip
0 commit comments