mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
1d9ea79107
* Introducing TrickOps - An Extensible Sim Testing Framework Features: * Multiple simultaneous sim builds, runs, file vs. file comparisons, arbitrary post-run analyses, valgrind of runs * Real-time progress bars for sim builds and runs * Exit code management lets users easily define success & failure * Failed comparisons can optionally generate koviz error reports See share/trick/trickops/README.md for details * Add GitHub Actions Workflow for TrickOps for Ubuntu:20.04 & CentOS latest * Adds python unit and doc tests to github actions for push / pull requests for Ubuntu:20.04 and CentOS 8:latest. MacOS still forthcoming. * Also updates documentation with TrickOps information * Remove duplicate / overwriting SIM_ definitions in ExampleWorkflow.py * Address Code Review / Discussion * Reduce set of sims tested in ExampleWorkflow.py to stable set * Add ExampleWorkflow.py to GitHub Actions * Clarify documentation and add image of TrickOps in action * Error/Ignore valgrind entries in YAML file if platform == darwin * Fix run.compare() logic error and add unit test to cover it Co-authored-by: Dan Jordan <daniel.d.jordan@nasa.gov>
80 lines
3.1 KiB
YAML
80 lines
3.1 KiB
YAML
name: TrickOps
|
|
# This workflow is triggered on pushes to the repository.
|
|
on: [push, pull_request]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
trickops-tests-ubuntu:
|
|
name: Unit Tests Ubuntu:20.04
|
|
runs-on: ubuntu-20.04
|
|
container: ubuntu:20.04
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: install dependencies
|
|
# Note that perl is for trick-gte which TrickOps runs and qt and everything after it is for koviz
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y git python3 python3-venv perl perl-modules-5.30 qtbase5-dev wget unzip g++ make flex bison
|
|
- name: create virtual environment
|
|
run: |
|
|
cd share/trick/trickops/
|
|
python3 -m venv .venv && source .venv/bin/activate && pip3 install -r requirements.txt
|
|
- name: get and build koviz
|
|
run: |
|
|
cd /tmp/ && wget -q https://github.com/nasa/koviz/archive/refs/heads/master.zip && unzip master.zip
|
|
cd /tmp/koviz-master/ && qmake && make
|
|
- name: run unit and doc tests
|
|
run: |
|
|
cd share/trick/trickops/tests/
|
|
source ../.venv/bin/activate
|
|
export PATH="/tmp/koviz-master/bin:${PATH}"
|
|
./run_tests.py
|
|
- uses: actions/upload-artifact@master
|
|
if: ${{ always() }}
|
|
with:
|
|
name: doctests
|
|
path: |
|
|
share/trick/trickops/tests/*_doctest_log.txt
|
|
/tmp/log.*
|
|
|
|
trickops-tests-centos8:
|
|
name: Unit Tests CentOS:latest
|
|
runs-on: ubuntu-20.04
|
|
container: centos:latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: install dependencies
|
|
# Note that perl is for trick-gte which TrickOps runs and qt and everything after it is for koviz
|
|
run: |
|
|
dnf install -y git python3-devel which perl perl-Digest-MD5 qt5-qtbase-devel bison clang flex make gcc gcc-c++ wget
|
|
- name: create virtual environment
|
|
run: |
|
|
cd share/trick/trickops/
|
|
python3 -m venv .venv && source .venv/bin/activate && pip3 install -r requirements.txt
|
|
- name: get and build koviz
|
|
run: |
|
|
cd /tmp/ && wget -q https://github.com/nasa/koviz/archive/refs/heads/master.zip && unzip master.zip
|
|
cd /tmp/koviz-master/ && qmake-qt5 && make
|
|
- name: run unit and doc tests
|
|
run: |
|
|
cd share/trick/trickops/tests/
|
|
source ../.venv/bin/activate
|
|
export PATH="/tmp/koviz-master/bin:${PATH}"
|
|
./run_tests.py
|
|
- uses: actions/upload-artifact@master
|
|
if: ${{ always() }}
|
|
with:
|
|
name: doctests
|
|
path: |
|
|
share/trick/trickops/tests/*_doctest_log.txt
|
|
/tmp/log.*
|
|
|
|
# TODO: ExampleWorkflow.py is not included here because it needs a built Trick
|
|
# to function correctly and I don't want to duplicate the Trick build testing
|
|
# here to provide testing of what is essentially an example provided for
|
|
# documentation purposes. If we could leverage artifacts from a previous
|
|
# stage and/or stable containers where Trick is already pre-built, we should
|
|
# consider adding ExampleWorfklow.py to testing in this file. -Jordan 4/2021
|