Merge pull request #135 from nasa/117-duplicated-thermaspectgenerate-… #195
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: Trick Library Dependencies | |
# 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: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- 'bin/utils/simbus_icd_input_gen/**' | |
- 'draw/**' | |
- '.github/workflows/**' | |
- '!.github/workflows/lib_deps.yml' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lib_deps: | |
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: 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 | |
- name: Checkout repository | |
uses: actions/checkout@master | |
# TODO use better way to define env vars globally for all steps | |
- name: Build gunns/lib/trick | |
run: | | |
export MAKEFLAGS=-j`nproc` | |
export GUNNS_TRICK_HOME="/home/trick" | |
export GUNNS_HOME=`pwd` | |
cd lib/trick | |
make OPTS='-O2' | |
# Reference: https://github.com/marketplace/actions/get-all-changed-files | |
- id: files | |
name: List added and modified files in commit | |
uses: jitterbit/get-changed-files@v1 | |
- name: Write class test list | |
run: | | |
cd sims/SIM_class_test_compile | |
for added_modified_file in ${{ steps.files.outputs.added_modified }} | |
do | |
echo "${added_modified_file}" >> class_test_list.py | |
done | |
# This keeps in the repo as an existing, but empty file, so cat won't error if | |
# above doesn't add any files | |
echo "class_test_list.py:" | |
cat class_test_list.py | |
- name: Run test suite, check for pass/fail | |
run: | | |
export TRICK_HOME="/home/trick" | |
export PATH="${PATH}:${TRICK_HOME}/bin" | |
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" | |
cd sims/SIM_class_test_compile | |
python3 ./test_list.py |