seal5-event #20
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
name: Build and Run ETISS RISCV Examples | |
on: | |
repository_dispatch: | |
types: [ seal5-event ] | |
env: | |
SEAL5_PREBUILT_DIR: /home/runner/work/seal5_prebuilt/release # TODO: change | |
ETISS_PREBUILT_DIR: /home/runner/work/etiss_prebuilt | |
PROG: s4emac | |
jobs: | |
compile-riscv-examples-openasip: | |
if: github.event.client_payload.name == 'openasip_demo' | |
runs-on: ubuntu-${{ matrix.ubuntu-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-version: | |
- 22.04 | |
build_type: | |
- Release | |
# - Debug | |
tc: | |
- {version: 2024.09.03, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32gc_xopenasipbase, abi: ilp32d} | |
# - {version: 2024.09.03_gcc14, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32gc_xopenasipbase, abi: ilp32d} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get current date | |
run: | | |
echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
id: date | |
- name: Download Cached Seal5 Binaries | |
id: cache-seal5 | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-seal5-binaries | |
with: | |
path: /home/runner/work/seal5_prebuilt | |
key: seal5-binaries-${{ github.event.client_payload.name }}-${{ matrix.ubuntu-version }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
seal5-binaries-${{ github.event.client_payload.name }}-${{ matrix.ubuntu-version }}- | |
seal5-binaries-${{ github.event.client_payload.name }}- | |
- name: Download Seal5 Pre-built | |
if: steps.cache-seal5.outputs.cache-hit != 'true' | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.client_payload.name }}-install-ubuntu-${{ matrix.ubuntu-version }}-release | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
repository: tum-ei-eda/seal5 | |
path: /home/runner/work/seal5_prebuilt | |
run-id: ${{ github.event.client_payload.triggered_run_id }} | |
- name: Download Cached GCC Binaries | |
id: cache-gcc | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-gcc-binaries | |
with: | |
path: gnu/ | |
key: gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }} | |
gcc-binaries-${{ matrix.ubuntu-version }} | |
gcc-binaries- | |
- name: Download RISCV-GNU-Toolchain | |
if: steps.cache-gcc.outputs.cache-hit != 'true' | |
run: | | |
wget https://syncandshare.lrz.de/dl/fi2p5Ds5PHktjmZGKzR9tx/GCC/default/${{ matrix.tc.version }}/Ubuntu/${{ matrix.ubuntu-version }}/${{ matrix.tc.variant }}.tar.xz | |
mkdir gnu | |
cd gnu | |
tar xvf ../${{ matrix.tc.variant }}.tar.xz | |
cd .. | |
rm ${{ matrix.tc.variant }}.tar.xz | |
- name: Setup Dependencies | |
run: | | |
sudo apt -qq install -y cmake | |
# TODO: install llvm/clang if no seal5 trigger? | |
- name: Build ETISS RISCV Examples for Testing | |
run: | | |
export PATH=$SEAL5_PREBUILT_DIR/bin/:$PATH | |
chmod +x $SEAL5_PREBUILT_DIR/bin/* | |
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=rv32gc-llvm-toolchain.cmake -DBUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DRISCV_ARCH=${{ matrix.tc.arch }} -DRISCV_ABI=${{ matrix.tc.abi }} -DRISCV_TOOLCHAIN_PREFIX=$(pwd)/gnu/ -DRISCV_TOOLCHAIN_BASENAME=${{ matrix.tc.name }} | |
cmake --build build -j$(nproc) | |
cmake --install build | |
- name: Upload ETISS RISCV Built Example Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
path: install/ | |
compile-riscv-examples-s4e: | |
if: github.event.client_payload.name == 's4e_demo' | |
runs-on: ubuntu-${{ matrix.ubuntu-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-version: | |
- 22.04 | |
build_type: | |
- Release | |
# - Debug | |
tc: | |
- {version: 2024.09.03, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32} | |
# - {version: 2024.09.03_gcc14, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get current date | |
run: | | |
echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | |
id: date | |
- name: Download Cached Seal5 Binaries | |
id: cache-seal5 | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-seal5-binaries | |
with: | |
path: /home/runner/work/seal5_prebuilt | |
key: seal5-binaries-${{ github.event.client_payload.name }}-${{ matrix.ubuntu-version }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
seal5-binaries-${{ github.event.client_payload.name }}-${{ matrix.ubuntu-version }}- | |
seal5-binaries-${{ github.event.client_payload.name }}- | |
- name: Download Seal5 Pre-built | |
if: steps.cache-seal5.outputs.cache-hit != 'true' | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.client_payload.name }}-install-ubuntu-${{ matrix.ubuntu-version }}-release | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
repository: tum-ei-eda/seal5 | |
path: /home/runner/work/seal5_prebuilt | |
run-id: ${{ github.event.client_payload.triggered_run_id }} | |
- name: Download Cached GCC Binaries | |
id: cache-gcc | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-gcc-binaries | |
with: | |
path: gnu/ | |
key: gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ steps.date.outputs.date }} | |
restore-keys: | | |
gcc-binaries-${{ matrix.ubuntu-version }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }} | |
gcc-binaries-${{ matrix.ubuntu-version }} | |
gcc-binaries- | |
- name: Download RISCV-GNU-Toolchain | |
if: steps.cache-gcc.outputs.cache-hit != 'true' | |
run: | | |
wget https://syncandshare.lrz.de/dl/fi2p5Ds5PHktjmZGKzR9tx/GCC/default/${{ matrix.tc.version }}/Ubuntu/${{ matrix.ubuntu-version }}/${{ matrix.tc.variant }}.tar.xz | |
mkdir gnu | |
cd gnu | |
tar xvf ../${{ matrix.tc.variant }}.tar.xz | |
cd .. | |
rm ${{ matrix.tc.variant }}.tar.xz | |
- name: Setup Dependencies | |
run: | | |
sudo apt -qq install -y cmake | |
# TODO: install llvm/clang if no seal5 trigger? | |
- name: Build ETISS RISCV Examples for Testing | |
run: | | |
export PATH=$SEAL5_PREBUILT_DIR/bin/:$PATH | |
chmod +x $SEAL5_PREBUILT_DIR/bin/* | |
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=rv32gc-llvm-toolchain.cmake -DBUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=$(pwd)/install -DRISCV_ARCH=${{ matrix.tc.arch }} -DRISCV_ABI=${{ matrix.tc.abi }} -DRISCV_TOOLCHAIN_PREFIX=$(pwd)/gnu/ -DRISCV_TOOLCHAIN_BASENAME=${{ matrix.tc.name }} | |
cmake --build build -j$(nproc) | |
cmake --install build | |
- name: Upload ETISS RISCV Built Example Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
path: install/ | |
run-riscv-examples-openasip: | |
if: github.event.client_payload.name == 'openasip_demo' | |
needs: compile-riscv-examples-openasip | |
runs-on: ubuntu-${{ matrix.ubuntu-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-version: | |
- 22.04 | |
build_type: | |
- Release | |
# - Debug | |
tc: | |
- {version: 2024.09.03, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xopenasipbase, abi: ilp32d} | |
# - {version: 2024.09.03_gcc14, variant: rv32gc_ilp32d, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xopenasipbase, abi: ilp32d} | |
etiss_arch: | |
- RV32IMAFDC | |
- RV32IMAFDCXOPENASIP | |
prog: | |
# - dhry | |
# - embench_aha-mont64 | |
# - embench_crc32 | |
# - embench_cubic | |
# - embench_edn | |
# - embench_huffbench | |
# - embench_matmult-int | |
# - embench_md5sum | |
# - embench_minver | |
# - embench_nbody | |
# - embench_nettle-aes | |
# - embench_nettle-sha256 | |
# - embench_nsichneu | |
# - embench_picojpeg | |
# - embench_primecount | |
# - embench_qrduino | |
# - embench_sglib-combined | |
# - embench_slre | |
# - embench_st | |
# - example_c | |
# - example_cpp | |
- hello_world | |
# - interactive | |
# - semihosting_cpp | |
# - test_cases | |
# - tflm_toy | |
# - tvm_toy | |
# TODO: openasip example | |
steps: | |
- name: Download Pre-built ETISS Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: etiss_prebuilt | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
path: /home/runner/work/etiss_prebuilt | |
repository: tum-ei-eda/etiss_riscv_test_env | |
run-id: ${{ github.event.client_payload.etiss_run_id }} | |
- name: Download ETISS RISCV Examples Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
path: install | |
- name: Setup Dependencies | |
run: | | |
sudo apt -qq install -y libboost-system-dev libboost-filesystem-dev libboost-program-options-dev | |
# TODO: install llvm/clang if no seal5 trigger? | |
- name: Run ETISS Example ${{ matrix.config.prog }} on ${{ matrix.config.etiss_arch }} | |
run: | | |
chmod +x $ETISS_PREBUILT_DIR/bin/bare_etiss_processor | |
export LD_LIBRARY_PATH=$ETISS_PREBUILT_DIR/lib:$ETISS_PREBUILT_DIR/lib/plugins:$LD_LIBRRARY_PATH | |
export PATH=$ETISS_PREBUILT_DIR/bin/:$PATH | |
bare_etiss_processor -iinstall/ini/${{ matrix.config.prog }}.ini --arch.cpu=${{ matrix.config.etiss_arch }} 2>&1 | tee out.txt | |
- name: Upload ETISS Outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: etiss-output-${{ matrix.prog }}-${{ matrix.etiss_arch }}-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
path: out.txt | |
run-riscv-examples-s4e: | |
if: github.event.client_payload.name == 's4e_demo' | |
needs: compile-riscv-examples-s4e | |
runs-on: ubuntu-${{ matrix.ubuntu-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ubuntu-version: | |
- 22.04 | |
build_type: | |
- Release | |
# - Debug | |
tc: | |
- {version: 2024.09.03, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32} | |
# - {version: 2024.09.03_gcc14, variant: rv32im_zicsr_zifencei_ilp32, name: riscv32-unknown-elf, arch: rv32im_zicsr_zifencei_xs4emac, abi: ilp32} | |
etiss_arch: | |
- RV32IMAFDC | |
- RV32IMCXS4EMAC | |
prog: | |
# - dhry | |
# - embench_aha-mont64 | |
# - embench_crc32 | |
# - embench_cubic | |
# - embench_edn | |
# - embench_huffbench | |
# - embench_matmult-int | |
# - embench_md5sum | |
# - embench_minver | |
# - embench_nbody | |
# - embench_nettle-aes | |
# - embench_nettle-sha256 | |
# - embench_nsichneu | |
# - embench_picojpeg | |
# - embench_primecount | |
# - embench_qrduino | |
# - embench_sglib-combined | |
# - embench_slre | |
# - embench_st | |
# - example_c | |
# - example_cpp | |
- hello_world | |
# - interactive | |
# - semihosting_cpp | |
# - test_cases | |
# - tflm_toy | |
# - tvm_toy | |
- s4emac | |
exclude: | |
- etiss_arch: RV32IMAFDC | |
prog: s4emac | |
steps: | |
- name: Download Pre-built ETISS Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: etiss_prebuilt | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
path: /home/runner/work/etiss_prebuilt | |
repository: tum-ei-eda/etiss_riscv_test_env | |
run-id: ${{ github.event.client_payload.etiss_run_id }} | |
- name: Download ETISS RISCV Examples Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: etiss-riscv-examples-prebuilt-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }} | |
path: install | |
- name: Setup Dependencies | |
run: | | |
sudo apt -qq install -y libboost-system-dev libboost-filesystem-dev libboost-program-options-dev | |
# TODO: install llvm/clang if no seal5 trigger? | |
- name: Run ETISS Example ${{ matrix.config.prog }} on ${{ matrix.config.etiss_arch }} | |
run: | | |
chmod +x $ETISS_PREBUILT_DIR/bin/bare_etiss_processor | |
export LD_LIBRARY_PATH=$ETISS_PREBUILT_DIR/lib:$ETISS_PREBUILT_DIR/lib/plugins:$LD_LIBRRARY_PATH | |
export PATH=$ETISS_PREBUILT_DIR/bin/:$PATH | |
bare_etiss_processor -iinstall/ini/${{ matrix.config.prog }}.ini --arch.cpu=${{ matrix.config.etiss_arch }} 2>&1 | tee out.txt | |
- name: Upload ETISS Outputs | |
uses: actions/upload-artifact@v4 | |
with: | |
name: etiss-output-${{ matrix.prog }}-${{ matrix.etiss_arch }}-${{ matrix.ubuntu-version }}-${{ matrix.build_type }}-${{ matrix.tc.version }}-${{ matrix.tc.variant }}-${{ matrix.tc.arch }}-${{ matrix.tc.abi }} | |
path: out.txt |