-
Notifications
You must be signed in to change notification settings - Fork 25
134 lines (112 loc) · 3.55 KB
/
temp.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#
# Copyright (c) 2022-present, Trail of Bits, Inc.
# All rights reserved.
#
# This source code is licensed in accordance with the terms specified in
# the LICENSE file found in the root directory of this source tree.
#
name: "Temporary action for testing"
on:
push
permissions: write-all
env:
LLVM_DISABLE_SYMBOLIZATION: 1
jobs:
build:
strategy:
matrix:
llvm-version: [18]
image-version: [22.04]
name: "Pre Release"
runs-on: ubuntu-${{ matrix.image-version }}
if: ${{ always() }}
timeout-minutes: 60
container:
image:
ghcr.io/trailofbits/vast-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest
env:
CMAKE_PREFIX_PATH: "/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/mlir/;/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/clang/"
TOOLCHAIN: ${{ github.workspace }}/cmake/lld.toolchain.cmake
LLVM_EXTERNAL_LIT: "/usr/local/bin/lit"
steps:
- name: Clone the VAST repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
- name: Configure build
run: cmake --preset ci
- name: Build release
run: cmake --build --preset ci-release -j $(nproc)
- name: Package
run: cpack --preset ci
- name: Upload VAST build artifact
uses: actions/upload-artifact@v4
with:
name: VAST
path: ./builds/ci/package/*
retention-days: 1
- name: Publish Pre-Release
uses: softprops/action-gh-release@v1
with:
tag_name: "latest"
prerelease: true
generate_release_notes: true
files: |
./LICENSE
./builds/ci/package/*
#
# Linux kernel benchmark
#
run_linux_kernel_bench:
name: "Run Linux kernel test suite"
needs: build
strategy:
matrix:
llvm-version: [18]
image-version: [22.04]
vast-target: ['hl']
disable-unsup: [true, false]
runs-on: ubuntu-${{ matrix.image-version }}
if: ${{ always() }}
timeout-minutes: 360
container:
image:
ghcr.io/trailofbits/vast-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest
steps:
- name: Fetch VAST artifact
uses: actions/download-artifact@v4
with:
name: VAST
- name: Unpack VAST
run: mkdir vast && tar -xf VAST-* -C vast --strip-components=1
- name: Export vast binaries
run: echo "${PWD}/vast/bin/" >> $GITHUB_PATH
- name: Install benchmark dependencies
run: |
apt-get update
apt-get -y install bear flex
- name: Clone the Linux kernel and build it to create compiliation database
run: |
git clone --depth=1 https://github.com/torvalds/linux.git linux
cd linux
make defconfig
bear -- make LLVM=1
- name: Clone vast benchmark directory
uses: actions/checkout@v4
with:
repository: trailofbits/vast-benchmarks
sparse-checkout: benchmarks/linux_kernel
ref: main
path: .
fetch-depth: 1
- name: Run benchmarks
run: >
python3 benchmarks/linux_kernel/run_vast_benchmark.py
vast-front # TODO: Determine if this is the correct path to vast-front
linux/compile_commands.json
vast_linux_kernel_mlir_with_unsup/
--num_processes=8
--vast_option="-xc"
--vast_option="-vast-emit-mlir=${{ matrix.vast-target }}"
> vast_linux_kernel_times_hl_with_unsup.tsv