Skip to content

Fixes to allow building ETISS Plugins out-of tree #425

Fixes to allow building ETISS Plugins out-of tree

Fixes to allow building ETISS Plugins out-of tree #425

Workflow file for this run

name: Build ETISS and run smoke tests
on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs:
build_etiss:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
path: etiss_source
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev \
llvm-11-dev libclang-11-dev clang-11
- name: CMake config
run: |
cmake -B etiss_build -S etiss_source -DCMAKE_INSTALL_PREFIX=etiss_prebuilt -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: CMake build
run: |
cmake --build etiss_build -j$(nproc)
- name: CMake install
run: |
cmake --build etiss_build --target install
- name: Upload compiled ETISS
uses: actions/upload-artifact@v4
with:
name: etiss_prebuilt
path: etiss_prebuilt
build_examples:
runs-on: ubuntu-22.04
strategy:
matrix:
bits: ["32", "64"]
steps:
- uses: actions/checkout@v4
with:
repository: tum-ei-eda/etiss_riscv_examples
path: examples_source
- name: Install cross compiler
run: |
wget https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v13.2.0-2/xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz
tar xf xpack-riscv-none-elf-gcc-13.2.0-2-linux-x64.tar.gz
mv xpack-riscv-none-elf-gcc-13.2.0-2 riscv_tc
- name: Configure examples
run: |
cmake -B examples_build_rv${{matrix.bits}} -S examples_source -DCMAKE_TOOLCHAIN_FILE=rv${{matrix.bits}}gc-toolchain.cmake -DRISCV_TOOLCHAIN_BASENAME=riscv-none-elf -DRISCV_TOOLCHAIN_PREFIX=$GITHUB_WORKSPACE/riscv_tc -DCMAKE_INSTALL_PREFIX=examples_prebuilt_rv${{matrix.bits}} -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build examples
run: |
cmake --build examples_build_rv${{matrix.bits}} -j$(nproc)
- name: Install examples
run: |
cmake --build examples_build_rv${{matrix.bits}} --target install
- name: Upload prebuilt examples
uses: actions/upload-artifact@v4
with:
name: examples_prebuilt_rv${{matrix.bits}}
path: examples_prebuilt_rv${{matrix.bits}}
run_examples:
runs-on: ubuntu-22.04
needs: [build_etiss, build_examples]
strategy:
matrix:
bits: ["32", "64"]
jit_engine: ["TCC", "GCC", "LLVM"]
test_program: ["example_c", "example_cpp", "test_cases"]
steps:
- name: Fetch precompiled artifacts
uses: actions/download-artifact@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libllvm11
- name: Run test
run: |
chmod +x etiss_prebuilt/bin/bare_etiss_processor
etiss_prebuilt/bin/bare_etiss_processor -iexamples_prebuilt_rv${{matrix.bits}}/ini/${{matrix.test_program}}.ini --jit.type=${{matrix.jit_engine}}JIT
run_benchmarks:
runs-on: ubuntu-22.04
needs: [build_etiss, build_examples]
strategy:
matrix:
bits: ["32", "64"]
jit_engine: ["TCC", "GCC", "LLVM"]
run_no: [1, 2, 3, 4, 5]
steps:
- name: Fetch precompiled artifacts
uses: actions/download-artifact@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libboost-filesystem-dev libboost-program-options-dev libllvm11
- name: Run benchmark
run: |
chmod +x etiss_prebuilt/bin/bare_etiss_processor
etiss_prebuilt/bin/bare_etiss_processor -iexamples_prebuilt_rv${{matrix.bits}}/ini/dhry.ini --jit.type=${{matrix.jit_engine}}JIT --vp.stats_file_path=${{github.workspace}}/run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}.json
- name: Save Benchmark results
uses: actions/upload-artifact@v4
with:
name: run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}
path: run_${{matrix.jit_engine}}_${{matrix.bits}}_${{matrix.run_no}}.json
merge_benchmark_results:
runs-on: ubuntu-22.04
needs: run_benchmarks
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dhry_results
pattern: run_*
delete-merged: true