2021-01-29 00:48:18 +00:00
|
|
|
name: Linux
|
2020-11-10 19:14:35 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-10-06 21:05:51 +00:00
|
|
|
branches:
|
|
|
|
- master
|
2020-11-10 19:14:35 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
2021-02-05 05:56:35 +00:00
|
|
|
- '.github/workflows/**'
|
|
|
|
- '!.github/workflows/test_linux.yml'
|
2021-05-27 03:00:38 +00:00
|
|
|
pull_request:
|
2022-03-17 19:55:27 +00:00
|
|
|
workflow_dispatch:
|
2020-11-10 19:14:35 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
cfg:
|
|
|
|
#-------- Operating Systems ----------------
|
2022-06-02 19:36:47 +00:00
|
|
|
- { os: ubuntu, tag: 22.04, arch: debian, arch_ver: 12 }
|
|
|
|
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
|
|
|
|
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
|
|
|
|
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
|
2022-11-21 21:25:08 +00:00
|
|
|
python: [3]
|
2020-11-10 19:14:35 +00:00
|
|
|
|
|
|
|
#-------- Defaults --------------------------
|
|
|
|
include:
|
|
|
|
- cfg: {}
|
|
|
|
deps: >-
|
|
|
|
bison
|
|
|
|
clang
|
|
|
|
flex
|
|
|
|
git
|
|
|
|
llvm
|
|
|
|
make
|
|
|
|
maven
|
|
|
|
cmake
|
2021-05-17 16:08:04 +00:00
|
|
|
zip
|
2023-03-20 22:53:01 +00:00
|
|
|
gdb
|
2020-11-10 19:14:35 +00:00
|
|
|
install_gtest: echo gtest already installed
|
|
|
|
conf_pkg: echo package manager already configured
|
|
|
|
install_cmd: install -y
|
|
|
|
#-------- Debian-based Dependencies ----------------
|
|
|
|
- cfg: { arch: debian }
|
|
|
|
pkg_mgr: apt-get
|
|
|
|
conf_pkg: apt-get update
|
|
|
|
arch_deps: >-
|
2021-02-06 01:32:36 +00:00
|
|
|
swig
|
2020-11-10 19:14:35 +00:00
|
|
|
curl
|
|
|
|
g++
|
|
|
|
libx11-dev
|
|
|
|
libxml2-dev
|
|
|
|
libxt-dev
|
|
|
|
libmotif-common
|
|
|
|
libmotif-dev
|
|
|
|
zlib1g-dev
|
|
|
|
llvm-dev
|
|
|
|
libclang-dev
|
|
|
|
libudunits2-dev
|
|
|
|
libgtest-dev
|
2022-03-17 19:55:27 +00:00
|
|
|
default-jdk
|
|
|
|
python2.7-dev
|
|
|
|
python3-dev
|
2022-11-17 21:43:29 +00:00
|
|
|
python3-pip
|
|
|
|
python3-venv
|
2022-06-02 19:30:52 +00:00
|
|
|
install_gtest: |
|
2023-03-20 22:53:01 +00:00
|
|
|
apt-get install -y libgtest-dev libgmock-dev
|
2022-06-02 19:30:52 +00:00
|
|
|
cd /usr/src/gtest
|
|
|
|
cmake .
|
|
|
|
make
|
|
|
|
cp lib/libgtest* /usr/lib/
|
2020-11-10 19:14:35 +00:00
|
|
|
#-------- RHEL Dependencies ----------------
|
|
|
|
- cfg: { arch: rhel }
|
|
|
|
arch_deps: >-
|
|
|
|
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
|
2022-03-17 19:55:27 +00:00
|
|
|
python2-devel
|
|
|
|
python3-devel
|
|
|
|
#-------- RHEL 7-based Only Dependencies ----------------
|
|
|
|
- cfg: { arch: rhel, arch_ver: 7 }
|
2020-11-10 19:14:35 +00:00
|
|
|
pkg_mgr: yum
|
2022-06-09 14:42:06 +00:00
|
|
|
conf_pkg: |
|
2022-03-17 19:55:27 +00:00
|
|
|
yum -y install epel-release
|
|
|
|
yum -y update
|
2020-11-10 19:14:35 +00:00
|
|
|
os_deps: >-
|
|
|
|
libX11-devel
|
|
|
|
libXt-devel
|
2021-02-06 01:32:36 +00:00
|
|
|
swig3
|
2023-03-20 22:53:01 +00:00
|
|
|
install_gtest: |
|
|
|
|
yum install -y http://repo.okay.com.mx/centos/7/x86_64/release/okay-release-1-6.el7.noarch.rpm
|
|
|
|
yum install -y gtest gtest-devel gmock gmock-devel
|
2022-03-17 19:55:27 +00:00
|
|
|
#-------- RHEL 8-based Only Dependencies ----------------
|
|
|
|
- cfg: { arch: rhel, arch_ver: 8 }
|
2022-02-15 18:51:44 +00:00
|
|
|
pkg_mgr: dnf
|
|
|
|
tag_deps: >-
|
|
|
|
swig
|
2022-03-17 19:55:27 +00:00
|
|
|
diffutils
|
|
|
|
conf_pkg: |
|
|
|
|
dnf -y install epel-release
|
|
|
|
dnf -y update
|
|
|
|
dnf install -y 'dnf-command(config-manager)'
|
|
|
|
install_gtest: |
|
|
|
|
dnf config-manager --enable powertools
|
2023-03-20 22:53:01 +00:00
|
|
|
dnf install -y gtest-devel gmock-devel
|
2022-03-17 19:55:27 +00:00
|
|
|
#-------- OS and Version Specific Dependencies ----------------
|
|
|
|
- cfg: { os: oraclelinux }
|
|
|
|
install_gtest: |
|
|
|
|
dnf config-manager --enable ol8_codeready_builder
|
2023-03-20 22:53:01 +00:00
|
|
|
dnf install -y gtest-devel gmock-devel
|
2020-11-10 19:14:35 +00:00
|
|
|
#-------- Job definition ----------------
|
2022-03-18 17:05:25 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-11-10 19:14:35 +00:00
|
|
|
container: docker://${{matrix.cfg.os}}:${{matrix.cfg.tag}}
|
|
|
|
steps:
|
|
|
|
- name: Update Package Manager
|
|
|
|
run: ${{matrix.conf_pkg}}
|
|
|
|
- name: Install Dependencies
|
2022-03-17 19:55:27 +00:00
|
|
|
run: >
|
|
|
|
${{matrix.pkg_mgr}}
|
|
|
|
${{matrix.install_cmd}}
|
|
|
|
${{matrix.deps}}
|
|
|
|
${{matrix.arch_deps}}
|
|
|
|
${{matrix.os_deps}}
|
|
|
|
${{matrix.tag_deps}}
|
2020-11-10 19:14:35 +00:00
|
|
|
- name: Install GTest
|
|
|
|
run: ${{matrix.install_gtest}}
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@master
|
2022-03-17 19:55:27 +00:00
|
|
|
- name: Configure Trick
|
2020-11-10 19:14:35 +00:00
|
|
|
run: |
|
|
|
|
export MAKEFLAGS=-j`nproc`
|
2022-03-17 19:55:27 +00:00
|
|
|
export PYTHON_VERSION=${{matrix.python}}
|
2020-11-10 19:14:35 +00:00
|
|
|
./configure
|
2022-03-17 19:55:27 +00:00
|
|
|
- name: Build Trick
|
2022-06-09 14:42:06 +00:00
|
|
|
run: |
|
2022-03-17 19:55:27 +00:00
|
|
|
export MAKEFLAGS=-j`nproc`
|
2020-11-10 19:14:35 +00:00
|
|
|
make
|
|
|
|
- name: Test
|
2022-08-01 20:11:12 +00:00
|
|
|
run: |
|
2022-11-17 21:43:29 +00:00
|
|
|
cd share/trick/trickops/
|
|
|
|
python3 -m venv .venv && . .venv/bin/activate && pip3 install -r requirements.txt
|
|
|
|
cd ../../../; make test
|
2022-03-18 17:05:25 +00:00
|
|
|
- name: Upload Tests
|
|
|
|
uses: actions/upload-artifact@v3.0.0
|
|
|
|
if: success() || failure() # run this step even if previous step failed
|
|
|
|
with:
|
|
|
|
name: Trick_${{matrix.cfg.os}}${{matrix.cfg.tag}}_py${{matrix.python}}
|
|
|
|
path: trick_test/*.xml
|
|
|
|
retention-days: 1
|
2022-03-17 19:55:27 +00:00
|
|
|
# Uncomment for build artifacts
|
|
|
|
# - name: Upload Trick Build
|
|
|
|
# uses: actions/upload-artifact@v3.0.0
|
|
|
|
# with:
|
2022-03-18 17:05:25 +00:00
|
|
|
# name: Trick_${{matrix.cfg.os}}${{matrix.cfg.tag}}_py${{matrix.python}}
|
2022-03-17 19:55:27 +00:00
|
|
|
# path: |
|
|
|
|
# bin
|
|
|
|
# include
|
|
|
|
# lib
|
|
|
|
# share
|
|
|
|
# libexec
|
|
|
|
# retention-days: 1
|