Skip to content

Create an initial CI pipeline #4

Create an initial CI pipeline

Create an initial CI pipeline #4

Workflow file for this run

name: Build and Test CML
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
container:
image: rockylinux:8
env:
TRICK_HOME: ${{ github.workspace }}/externals/trick
JEOD_HOME: ${{ github.workspace }}/externals/jeod
steps:
- name: Install system dependencies
run: |
dnf install -y epel-release
dnf update -y
dnf install -y 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
dnf config-manager --enable powertools
dnf install -y gtest-devel gmock-devel
- name: Checkout code
uses: actions/checkout@v4
- name: Configure environment
run: echo "MAKEFLAGS=-j$(nproc)" >> "$GITHUB_ENV"
- name: Set up Python virtual environment
run: |
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Build Trick
run: |
source .venv/bin/activate
git clone https://github.com/nasa/trick.git --branch 25.1.0 ${TRICK_HOME}
cd ${TRICK_HOME}
./configure
make
- name: Build JEOD
run: |
source .venv/bin/activate
git clone https://github.com/nasa/jeod.git --branch jeod_v5.4.1 ${JEOD_HOME}
cd ${JEOD_HOME}
make -f bin/jeod/makefile TRICK_BUILD=1
cd ${JEOD_HOME}/trickified
make
- name: Build CML and run unit tests
run: cmake --workflow --preset dev