forked from killvxk/llvm-msvc-ex
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.67 KB
/
windows-llvm-msvc-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: windows-llvm-msvc-build
permissions:
contents: write
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
env:
BUILD_TYPE: Release
steps:
- name: Checkout Repo
uses: actions/checkout@main
with:
path: llvm-msvc
submodules: 'recursive'
- name: Build llvm
run: |
cmake -Bbuild -A X64 -DLLDB_ENABLE_PYTHON=OFF -DLLVM_INCLUDE_TESTS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_ZLIB=OFF -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DLLVM_USE_CRT_RELEASE=MT -DCPACK_GENERATOR=ZIP -DCMAKE_INSTALL_PREFIX=install -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_OBFUSCATION_LINK_INTO_TOOLS=ON -DLLVM_ENABLE_PROJECTS="clang;lld;lldb" llvm-msvc\\llvm
cmake --build build --config ${{ env.BUILD_TYPE }}
cmake --build build --config ${{ env.BUILD_TYPE }} --target install
- name: Package llvm
run: |
7z a -t7z -mmt -mf -mhc -mhcf -m0=LZMA2 -mx=9 windows-llvm-msvc.7z install
- name: Upload Artifact
uses: actions/upload-artifact@main
with:
name: windows-llvm-msvc
path: windows-llvm-msvc.7z
- name: Release
uses: softprops/action-gh-release@master
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') || contains(github.ref, '-pre') }}
files: windows-llvm-msvc.7z
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}