From fefb86a21eb05276a13a48dbcf33e606213efdd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Hedstr=C3=B6m?= Date: Fri, 25 Aug 2023 16:15:06 +0200 Subject: [PATCH] Run the DML tests from GitHub Action intead of TeamCity build --- .github/workflows/build-and-test.sh | 30 +++++++++++++++++++++++++++ .github/workflows/build-and-test.yaml | 22 ++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 .github/workflows/build-and-test.sh create mode 100644 .github/workflows/build-and-test.yaml diff --git a/.github/workflows/build-and-test.sh b/.github/workflows/build-and-test.sh new file mode 100755 index 000000000..b77d0b58c --- /dev/null +++ b/.github/workflows/build-and-test.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# © 2021-2023 Intel Corporation +# SPDX-License-Identifier: MPL-2.0 + +# Install Simics Base +PACKAGE_REPO=https://af02p-or.devtools.intel.com/artifactory/simics-repos/pub/simics-6/linux64/ +INSTALL_DIR=install +ispm install 1000-6.latest -y --install-dir $INSTALL_DIR --package-repo $PACKAGE_REPO +if [ $? -ne 0 ]; then + echo "*** Failed to install Simics Base, see build-log for details" + exit 1 +fi + +# Create project +DMLC_PROJ=proj +mkdir -p $DMLC_PROJ +./$INSTALL_DIR/*/bin/project-setup $DMLC_PROJ +pushd $DMLC_PROJ + +# Setup link to DMLC sources in repo +pushd modules/ +ln -s ../.. dmlc +popd + +# Local build of dmlc +CPUS=$(cat /proc/cpuinfo | grep ^processor | wc -l) +make dmlc -j $CPUS || exit $? + +# Run the tests +T126_JOBS=$CPUS DMLC_CC=/usr/itm/gcc/13.1.0/bin/gcc ./bin/test-runner --moduledirs modules/dmlc --suite modules/dmlc/test || exit $? diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml new file mode 100644 index 000000000..ac388d7c9 --- /dev/null +++ b/.github/workflows/build-and-test.yaml @@ -0,0 +1,22 @@ +name: Build and Test + +on: + workflow_dispatch: + pull_request: + branches: + - main + push: + branches: + - main + +env: + no_proxy: intel.com,.intel.com,localhost,127.0.0.1 + +jobs: + tests: + runs-on: [self-hosted, gklab, lgr] + steps: + - uses: actions/checkout@v3 + - name: Build and test + run: | + ./.github/workflows/build-and-test.sh