Skip to content

Commit

Permalink
gh: Temporary commit for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
PappasBrent committed Aug 6, 2024
1 parent ec4ec4c commit 1d72d56
Showing 1 changed file with 85 additions and 82 deletions.
167 changes: 85 additions & 82 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
name: "Pre Release"

on:
workflow_run:
workflows: ["Build"]
types:
- completed
branches:
- "master"
push

permissions: write-all

Expand All @@ -30,7 +25,7 @@ jobs:

name: "Pre Release"
runs-on: ubuntu-${{ matrix.image-version }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ always() }}
timeout-minutes: 60
container:
image:
Expand Down Expand Up @@ -319,6 +314,7 @@ jobs:
disable-unsup: [true, false]

runs-on: ubuntu-${{ matrix.image-version }}
if: ${{ always() }}
timeout-minutes: 360
container:
image:
Expand Down Expand Up @@ -347,84 +343,89 @@ jobs:
run: |
git clone --depth=1 https://github.com/torvalds/linux.git linux
cd linux
make defconfig
make distclean
make clean
make defconfig LLVM=-${{ matrix.llvm-version }}
make prepare LLVM=-${{ matrix.llvm-version }}
make LLVM=-${{ matrix.llvm-version }} -j $(nproc)
python3 ./scripts/clang-tools/gen_compile_commands.py
cat compile_commands.json
cd ../
- name: Clone vast benchmark directory
uses: actions/checkout@v4
with:
repository: trailofbits/vast-benchmarks
sparse-checkout: benchmarks/linux_kernel
ref: main
path: vast-benchmarks/
fetch-depth: 1

- name: Setup result suffix and vast arguments
run: |
if [ "${{ matrix.disable-unsup }}" = "false" ]; then
echo "VAST_RESULTS_SUFFIX=with_unsup" >> $GITHUB_ENV
else
echo "VAST_RESULTS_SUFFIX=without_unsup" >> $GITHUB_ENV
echo "VAST_DISABLE_UNSUPPORTED=-vast-disable-unsupported" >> $GITHUB_ENV
fi
- name: Run benchmarks
run: >
python3 ${PWD}/vast-benchmarks/benchmarks/linux_kernel/run_vast_benchmark.py
vast-front
${PWD}/linux/compile_commands.json
--num_processes=$(nproc)
--vast_option="-xc"
--vast_option="-vast-emit-mlir=${{ matrix.vast-target }}"
--vast_option="${{ env.VAST_DISABLE_UNSUPPORTED }}"
--print_errors
> vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv
path: ./vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv

convert_linux_kernel_bench:
name: "Convert Linux Kernel benchmark results to Markdown"
needs: run_linux_kernel_bench
strategy:
matrix:
image-version: [22.04]
runs-on: ubuntu-${{ matrix.image-version }}
steps:
- name: Fetch result artifacts
uses: actions/download-artifact@v4
with:
pattern: vast_linux_kernel_times_*
merge-multiple: true

- name: Install converter dependencies
run: pip3 install pandas scipy tabulate

- name: Clone vast benchmark directory
uses: actions/checkout@v4
with:
repository: trailofbits/vast-benchmarks
sparse-checkout: utils/
ref: main
path: vast-benchmarks/
fetch-depth: 1

- name: Generate the results
run: >
python3 vast-benchmarks/utils/to_markdown.py \
'{ "HighLevel with unsupported": "vast_linux_kernel_times_hl_with_unsup.tsv", "HighLevel" : "vast_linux_kernel_times_hl_without_unsup.tsv" }'
--output_filepath linux_kernel_times.md
- name: Post results as artifacts
uses: actions/upload-artifact@v4
with:
name: linux_kernel_times.md
path: ./linux_kernel_times.md
# - name: Clone vast benchmark directory
# uses: actions/checkout@v4
# with:
# repository: trailofbits/vast-benchmarks
# sparse-checkout: benchmarks/linux_kernel
# ref: main
# path: vast-benchmarks/
# fetch-depth: 1

# - name: Setup result suffix and vast arguments
# run: |
# if [ "${{ matrix.disable-unsup }}" = "false" ]; then
# echo "VAST_RESULTS_SUFFIX=with_unsup" >> $GITHUB_ENV
# else
# echo "VAST_RESULTS_SUFFIX=without_unsup" >> $GITHUB_ENV
# echo "VAST_DISABLE_UNSUPPORTED=-vast-disable-unsupported" >> $GITHUB_ENV
# fi

# - name: Run benchmarks
# run: >
# python3 ${PWD}/vast-benchmarks/benchmarks/linux_kernel/run_vast_benchmark.py
# vast-front
# ${PWD}/linux/compile_commands.json
# --num_processes=$(nproc)
# --vast_option="-xc"
# --vast_option="-vast-emit-mlir=${{ matrix.vast-target }}"
# --vast_option="${{ env.VAST_DISABLE_UNSUPPORTED }}"
# --print_errors
# > vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv

# - name: Upload results
# uses: actions/upload-artifact@v4
# with:
# name: vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv
# path: ./vast_linux_kernel_times_${{ matrix.vast-target }}_${{ env.VAST_RESULTS_SUFFIX }}.tsv

# convert_linux_kernel_bench:
# name: "Convert Linux Kernel benchmark results to Markdown"
# needs: run_linux_kernel_bench
# strategy:
# matrix:
# image-version: [22.04]
# runs-on: ubuntu-${{ matrix.image-version }}
# if: ${{ always() }}
# steps:
# - name: Fetch result artifacts
# uses: actions/download-artifact@v4
# with:
# pattern: vast_linux_kernel_times_*
# merge-multiple: true

# - name: Install converter dependencies
# run: pip3 install pandas scipy tabulate

# - name: Clone vast benchmark directory
# uses: actions/checkout@v4
# with:
# repository: trailofbits/vast-benchmarks
# sparse-checkout: utils/
# ref: main
# path: vast-benchmarks/
# fetch-depth: 1

# - name: Generate the results
# run: >
# python3 vast-benchmarks/utils/to_markdown.py \
# '{ "HighLevel with unsupported": "vast_linux_kernel_times_hl_with_unsup.tsv", "HighLevel" : "vast_linux_kernel_times_hl_without_unsup.tsv" }'
# --output_filepath linux_kernel_times.md

# - name: Post results as artifacts
# uses: actions/upload-artifact@v4
# with:
# name: linux_kernel_times.md
# path: ./linux_kernel_times.md

#
# Webpage build
Expand All @@ -436,7 +437,9 @@ jobs:
image-version: [22.04]
name: "Build VAST doc"
runs-on: ubuntu-${{ matrix.image-version }}
needs: [eval_llvm_ts, eval_svcomp, convert_linux_kernel_bench]
if: ${{ always() }}
# needs: [eval_llvm_ts, eval_svcomp, convert_linux_kernel_bench]
needs: [eval_llvm_ts, eval_svcomp]
timeout-minutes: 60
container:
image:
Expand Down

0 comments on commit 1d72d56

Please sign in to comment.