2021-01-29 00:48:18 +00:00
|
|
|
name: Linux
|
2020-11-10 19:14:35 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
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:
|
2020-11-10 19:14:35 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
cfg:
|
|
|
|
#-------- Operating Systems ----------------
|
|
|
|
- { os: ubuntu, tag: 18.04, arch: debian } # EOL April 2023
|
|
|
|
- { os: ubuntu, tag: 20.04, arch: debian } # EOL April 2025
|
|
|
|
- { os: debian, tag: 10, arch: debian } # EOL 2024
|
|
|
|
- { os: centos, tag: 7, arch: rhel } # EOL June 2024
|
|
|
|
- { os: centos, tag: latest, arch: rhel } # 8 as of April 2020
|
2021-05-27 02:56:59 +00:00
|
|
|
# - { os: fedora, tag: latest, arch: rhel } # 31 as of April 2020
|
2020-11-10 19:14:35 +00:00
|
|
|
# - { os: fedora, tag: 33, arch: rhel } # feeling confident?
|
|
|
|
# - { os: fedora, tag: rawhide, arch: rhel } # for thrill-seekers only
|
|
|
|
|
|
|
|
#-------- Defaults --------------------------
|
|
|
|
include:
|
|
|
|
- cfg: {}
|
|
|
|
deps: >-
|
|
|
|
bison
|
|
|
|
clang
|
|
|
|
flex
|
|
|
|
git
|
|
|
|
llvm
|
|
|
|
make
|
|
|
|
maven
|
|
|
|
cmake
|
2021-05-17 16:08:04 +00:00
|
|
|
zip
|
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
|
|
|
|
python2.7-dev
|
|
|
|
zlib1g-dev
|
|
|
|
llvm-dev
|
|
|
|
libclang-dev
|
|
|
|
libudunits2-dev
|
|
|
|
libgtest-dev
|
2021-07-27 19:21:13 +00:00
|
|
|
python3
|
|
|
|
python3-venv
|
2020-11-10 19:14:35 +00:00
|
|
|
install_gtest: cd /usr/src/gtest && cmake . && make && cp libgtest* /usr/lib/
|
|
|
|
#-------- 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
|
|
|
|
gtest-devel
|
2021-07-27 19:21:13 +00:00
|
|
|
python3-devel
|
2020-11-10 19:14:35 +00:00
|
|
|
#-------- Ubuntu Only Dependencies ----------------
|
|
|
|
- cfg: { os: ubuntu }
|
|
|
|
os_deps: >-
|
|
|
|
openjdk-11-jdk
|
|
|
|
#-------- Debian OS Only Dependencies ----------------
|
|
|
|
- cfg: { os: debian }
|
|
|
|
os_deps: >-
|
|
|
|
openjdk-11-jdk
|
|
|
|
#-------- CentOS Only Dependencies ----------------
|
|
|
|
- cfg: { os: centos }
|
|
|
|
pkg_mgr: yum
|
|
|
|
conf_pkg: yum -y install epel-release && yum -y update
|
|
|
|
os_deps: >-
|
|
|
|
libX11-devel
|
|
|
|
libXt-devel
|
|
|
|
#-------- Fedora Only Dependencies ----------------
|
2021-05-27 04:15:57 +00:00
|
|
|
# - cfg: { os: fedora }
|
|
|
|
# pkg_mgr: dnf
|
|
|
|
# os_deps: >-
|
|
|
|
# swig
|
|
|
|
# perl-Text-Balanced
|
|
|
|
# python-devel
|
|
|
|
# diffutils
|
2020-11-10 19:14:35 +00:00
|
|
|
#-------- Version Specific Dependencies ----------------
|
|
|
|
- cfg: { os: ubuntu, tag: 20.04 }
|
|
|
|
conf_pkg: DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -y tzdata
|
|
|
|
install_gtest: cd /usr/src/gtest && cmake . && make && cp lib/libgtest* /usr/lib/
|
|
|
|
tag_deps: >-
|
|
|
|
python3.8-dev
|
|
|
|
- cfg: { os: centos, tag: 7 }
|
|
|
|
tag_deps: >-
|
2021-02-06 01:32:36 +00:00
|
|
|
swig3
|
2020-11-10 19:14:35 +00:00
|
|
|
python-devel
|
|
|
|
- cfg: { os: centos, tag: latest }
|
|
|
|
pkg_mgr: dnf
|
|
|
|
conf_pkg: >
|
|
|
|
dnf -y install epel-release &&
|
|
|
|
dnf -y update &&
|
|
|
|
dnf install -y 'dnf-command(config-manager)' &&
|
2020-12-15 18:48:21 +00:00
|
|
|
dnf config-manager --enable powertools
|
2020-11-10 19:14:35 +00:00
|
|
|
tag_deps: >-
|
2021-02-06 01:32:36 +00:00
|
|
|
swig
|
2020-11-10 19:14:35 +00:00
|
|
|
python3-devel diffutils
|
|
|
|
#-------- Job definition ----------------
|
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
container: docker://${{matrix.cfg.os}}:${{matrix.cfg.tag}}
|
|
|
|
steps:
|
2021-07-27 18:26:29 +00:00
|
|
|
# - name: Set up Python ${{ matrix.python-version }}
|
|
|
|
# uses: actions/setup-python@v2
|
|
|
|
# with:
|
|
|
|
# python-version: ${{ matrix.python-version }}
|
2021-07-27 23:33:20 +00:00
|
|
|
- name: Info
|
|
|
|
run: |
|
|
|
|
pwd
|
|
|
|
echo $TEST
|
|
|
|
env:
|
|
|
|
TEST: Hello World!
|
2020-11-10 19:14:35 +00:00
|
|
|
- name: Update Package Manager
|
|
|
|
run: ${{matrix.conf_pkg}}
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
${{matrix.pkg_mgr}} ${{matrix.install_cmd}} ${{matrix.deps}} ${{matrix.arch_deps}} ${{matrix.os_deps}} ${{matrix.tag_deps}}
|
2021-07-27 19:37:11 +00:00
|
|
|
- name: Install GTest
|
|
|
|
run: ${{matrix.install_gtest}}
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@master
|
2021-07-27 19:33:20 +00:00
|
|
|
- name: Create testing environment
|
|
|
|
run: |
|
|
|
|
cd share/trick/pymods/trick/
|
2021-07-27 19:43:44 +00:00
|
|
|
python3 -m venv .venv && . .venv/bin/activate && pip3 install -r requirements.txt
|
2020-11-10 19:14:35 +00:00
|
|
|
- name: Build trick
|
|
|
|
run: |
|
|
|
|
export MAKEFLAGS=-j`nproc`
|
|
|
|
./configure
|
|
|
|
make
|
2021-07-27 19:55:51 +00:00
|
|
|
- name: Run Civet Tests
|
|
|
|
run: |
|
|
|
|
cd share/trick/pymods/trick/
|
|
|
|
. .venv/bin/activate
|
|
|
|
./run_tests.py
|
2021-07-27 23:06:52 +00:00
|
|
|
env:
|
2021-07-27 23:33:20 +00:00
|
|
|
TRICK_HOME: "/"
|
2020-11-10 19:14:35 +00:00
|
|
|
- name: Test
|
2021-07-27 18:34:28 +00:00
|
|
|
run: make test
|