-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (64 loc) · 2.18 KB
/
build.yaml
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: Builds
permissions:
contents: read
actions: write
on:
push:
branches: [ "main" ]
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Checkout submodules' submodules
run: |
# Checkout IREE's submodule but not the submodules of IREE's submodules!
# This saves us cloning LLVM twice.
# If we were lazy we could just clone recursively.
cd ${{github.workspace}}/iree && git submodule update --init --force --depth=1
cd ${{github.workspace}}/snitch_cluster && git submodule update --init --force --depth=1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
cache-dependency-path: |
./runtime/**/requirements.txt
./codegen/**/requirements.txt
./requirements.txt
./xdsl
- name: Install minimum required cmake and ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.21.0"
- name: Install CCache
uses: Chocobo1/setup-ccache-action@v1
with:
ccache_options: |
max_size=400M
compiler_check=none
- name: Install Native Compilers
run: |
sudo apt-get update
sudo apt-get install lld clang
- name: Install Quidditch Toolchain
run: |
mkdir ./toolchain
docker run --rm ghcr.io/opencompl/quidditch/toolchain:main tar -cC /opt/quidditch-toolchain . \
| tar -xC ./toolchain
- name: Configure Megabuild
run: |
cmake -G Ninja -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DQUIDDITCH_TOOLCHAIN_FILE=${{github.workspace}}/toolchain/ToolchainFile.cmake \
-DOVERRIDE_VENV=ON \
-S ${{github.workspace}}
- name: Build and Test
run: cmake --build ${{github.workspace}}/build --target test