From 7b9787c0f5c93ebf61cb4c09d65ec1630f6492d2 Mon Sep 17 00:00:00 2001 From: Kathlene Magnus Date: Thu, 14 Nov 2024 11:41:25 -0600 Subject: [PATCH] Set up github regression --- .github/CODEOWNERS | 5 ++ .github/actions/build/entrypoint.sh | 54 +++++++++++++++++ .github/workflows/ubuntu-build.yml | 91 +++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100755 .github/actions/build/entrypoint.sh create mode 100644 .github/workflows/ubuntu-build.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..476b84d --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @global-owner1 and @global-owner2 will be requested for +# review when someone opens a pull request. +* @kathlenemagnus diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh new file mode 100755 index 0000000..047f070 --- /dev/null +++ b/.github/actions/build/entrypoint.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +set -x + +source "/usr/share/miniconda/etc/profile.d/conda.sh" +conda activate riscv_func_model + +echo "Starting Build Entry" +echo "HOME:" $HOME +echo "GITHUB_WORKSPACE:" $GITHUB_WORKSPACE +echo "GITHUB_EVENT_PATH:" $GITHUB_EVENT_PATH +echo "CONDA_PREFIX:" $CONDA_PREFIX +echo "PWD:" `pwd` + +CXX_COMPILER=${COMPILER/clang/clang++} + +# +# Compile Sparta Infra (always build with release) +# Have other build types point to release +# +echo "Building Sparta Infra" +cd ${GITHUB_WORKSPACE}/map/sparta +mkdir -p release +cd release +CC=$COMPILER CXX=$CXX_COMPILER cmake .. -DCMAKE_BUILD_TYPE=Release -DGEN_DEBUG_INFO=OFF -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} +if [ $? -ne 0 ]; then + echo "ERROR: CMake for Sparta framework failed" + exit 0 +fi +make -j$(nproc --all) install > install.log +BUILD_SPARTA=$? +if [ ${BUILD_SPARTA} -ne 0 ]; then + echo "ERROR: build sparta FAILED!!!" + echo "$( regress.log +BUILD_ATLAS=$? +if [ ${BUILD_ATLAS} -ne 0 ]; then + echo "ERROR: build/regress of Atlas FAILED!!!" + echo "$(