Skip to content

Merge pull request #118 from Axiom-Space/c_to_c++_standard_functions #207

Merge pull request #118 from Axiom-Space/c_to_c++_standard_functions

Merge pull request #118 from Axiom-Space/c_to_c++_standard_functions #207

Workflow file for this run

name: Test Trick Sim
# For more info and troubleshooting help for this workflow, see the Continuous Integration
# page in the GUNNS Wiki.
#
# We'd rather use a pre-built Docker image with the dependencies already installed, but we
# don't have a place to store the image. We can't use the GiHhub Container Registry or
# Package containers, and don't want to use Docker Hub, so we have to configure the
# container from scratch each time.
on:
push:
paths-ignore:
- 'README.md'
- 'bin/utils/simbus_icd_input_gen/**'
- '.github/workflows/**'
- '!.github/workflows/sim_test.yml'
jobs:
sim_test:
runs-on: ubuntu-latest
container: docker://oraclelinux:8
steps:
- name: Update package manager
run: |
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf config-manager --set-enabled ol8_codeready_builder
dnf -y update
- name: Install Trick dependencies
run: >
dnf -y install 'dnf-command(config-manager)' dnf-plugins-core
bison clang flex git llvm make maven swig cmake clang-devel
gcc gcc-c++ java-11-openjdk-devel libxml2-devel llvm-devel llvm-static
ncurses-devel openmotif openmotif-devel perl perl-Digest-MD5 udunits2
udunits2-devel which zlib-devel libX11-devel libXt-devel python3-devel diffutils
- name: Install GTest
run: dnf install -y gtest-devel
- name: Install GUNNS dependencies
run: dnf install -y tk-devel
- name: Checkout repository
uses: actions/checkout@master
- name: Build Trick
# Failure here is likely due to new or changed dependencies of Trick, see above
# For issue #93: we use the same fix as Trick for assigning JAVA_HOME, see:
# trick/.github/workflows/test_32_oracle.yml
run: |
export TRICK_HOME="/home/trick"
export MAKEFLAGS=-j`nproc`
export JAVA_HOME=$(dirname $(dirname $(readlink -f `which java`)))
git clone https://github.com/nasa/trick.git ${TRICK_HOME}
cd ${TRICK_HOME}
./configure
make
# TODO use better way to define env vars globally for all steps
- name: Build sim
run: |
export TRICK_HOME="/home/trick"
export MAKEFLAGS=-j`nproc`
export GUNNS_HOME=`pwd`
export MS_UTILS_HOME="${GUNNS_HOME}/ms-utils"
export TS_MODELS_HOME="${GUNNS_HOME}/gunns-ts-models"
export HS_CONFIG_PATH="${GUNNS_HOME}/sims/Modified_data"
cd sims/SIM_test
${TRICK_HOME}/bin/trick-CP
- name: Run sim
run: |
export TRICK_HOME="/home/trick"
export MAKEFLAGS=-j`nproc`
export GUNNS_HOME=`pwd`
export MS_UTILS_HOME="${GUNNS_HOME}/ms-utils"
export TS_MODELS_HOME="${GUNNS_HOME}/gunns-ts-models"
export HS_CONFIG_PATH="${GUNNS_HOME}/sims/Modified_data"
cd sims/SIM_test
./S_main* RUN_test/input_int_test.py
- name: Check sim outputs for pass/fail
run: |
export GUNNS_HOME=`pwd`
cd test/CI
chmod +x sim_test.py
python3 ./sim_test.py