-
Notifications
You must be signed in to change notification settings - Fork 541
76 lines (63 loc) · 2.68 KB
/
llvm.yml
File metadata and controls
76 lines (63 loc) · 2.68 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: LLVM
on:
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-13]
platform: [x64, arm64]
build-cfg: [Debug, DebugOpt, Release]
runs-on: ${{ matrix.os }}
env:
CC: ${{ startsWith(matrix.os, 'ubuntu') && 'gcc-11' || 'clang' }}
CXX: ${{ startsWith(matrix.os, 'ubuntu') && 'g++-11' || 'clang++' }}
PLATFORM: ${{ matrix.platform }}
BUILD_CONFIGURATION: ${{ matrix.build-cfg }}
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
- run: df -h
- name: Free Disk Space
if: startsWith(matrix.os, 'ubuntu')
uses: endersonmenezes/free-disk-space@v2
with:
remove_android: true
remove_dotnet: true
remove_haskell: true
remove_tool_cache: true
remove_swap: true
remove_packages: "azure-cli google-cloud-cli microsoft-edge-stable google-chrome-stable firefox postgresql* temurin-* *llvm* mysql* dotnet-sdk-*"
remove_packages_one_command: true
remove_folders: "/usr/share/swift /usr/share/miniconda /usr/share/az* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell /usr/local/julia /usr/local/aws-cli /usr/local/aws-sam-cli /usr/share/gradle"
testing: false
- name: Free Disk Space
if: startsWith(matrix.os, 'macos')
run: |
sudo rm -rf /Library/Frameworks/Mono.framework
sudo rm -rf /Library/Frameworks/Xamarin.iOS.framework
sudo rm -rf /Library/Frameworks/Xamarin.Android.framework
sudo rm -rf /Users/runner/Library/Android
sudo rm -rf /usr/local/share/powershell
sudo find /Applications -type d -name "Xcode_*.app" ! -name "Xcode_$XCODE_VERSION.app" -prune -exec rm -rf "{}" \;
- run: df -h
- name: Install cross compilers
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.platform, 'arm64')
run: sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
- name: Clone LLVM
shell: bash
run: build/build.sh clone_llvm
- name: Build LLVM
shell: bash
run: build/build.sh build_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
- name: Package LLVM
shell: bash
run: build/build.sh package_llvm -platform $PLATFORM -configuration $BUILD_CONFIGURATION
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: llvm-${{ matrix.os }}-${{ matrix.platform }}-${{ matrix.build-cfg }}
overwrite: true
path: build/llvm/llvm-*-*.*