gh: try changing vast benchmark path #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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'] | |
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 | |
# Not sure which exact clang or LLVM packages are necessary | |
- name: Install benchmark dependencies | |
run: | | |
apt-get update | |
apt-get -y install git fakeroot build-essential \ | |
ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison \ | |
bear \ | |
clang-18 clang-tools-18 \ | |
lld-18 \ | |
llvm-18 llvm-18-tools llvm-18-linker-tools llvm-18-runtime | |
- name: Clone the Linux kernel and build it to create compilation database | |
run: | | |
git clone --depth=1 https://github.com/torvalds/linux.git linux | |
cd linux | |
bear -- make defconfig | |
cd ../ | |
ls linux | |
- name: Clone vast benchmark directory | |
uses: actions/checkout@v4 | |
with: | |
repository: trailofbits/vast-benchmarks | |
sparse-checkout: benchmarks/linux_kernel | |
ref: main | |
path: torvalds/ | |
fetch-depth: 1 | |
- name: Run benchmarks | |
run: > | |
python3 ${PWD}/benchmarks/linux_kernel/run_vast_benchmark.py | |
vast-front | |
${PWD}/torvalds/linux/compile_commands.json | |
${PWD}/vast_linux_kernel_mlir_with_unsup/ | |
--num_processes=$(nproc) | |
--vast_option="-xc" | |
--vast_option="-vast-emit-mlir=${{ matrix.vast-target }}" | |
> vast_linux_kernel_times_hl_with_unsup.tsv |