mirror of
https://github.com/nasa/trick.git
synced 2024-12-24 07:16:41 +00:00
Configure fixes and GitHub Actions workflow changes (#1245)
* major refactor of test_linux workflow * oracle linux, almalinux, and debian 11 added to workflow * #1243 ac_path_progs does not cache negative result like ac_path_prog. Strange. Fix bad python and python-config behavior * add or statement in case behavior changes across autoconf versions * all OSs now test both python 2 and python 3
This commit is contained in:
parent
792e0bc48f
commit
3b73be173a
143
.github/workflows/test_linux.yml
vendored
143
.github/workflows/test_linux.yml
vendored
@ -7,6 +7,7 @@ on:
|
|||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
- '!.github/workflows/test_linux.yml'
|
- '!.github/workflows/test_linux.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -15,15 +16,15 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
cfg:
|
cfg:
|
||||||
#-------- Operating Systems ----------------
|
#-------- Operating Systems ----------------
|
||||||
- { os: ubuntu, tag: 18.04, arch: debian } # EOL April 2023
|
- { os: ubuntu, tag: 18.04, arch: debian, arch_ver: 10 }
|
||||||
- { os: ubuntu, tag: 20.04, arch: debian } # EOL April 2025
|
- { os: ubuntu, tag: 20.04, arch: debian, arch_ver: 11 }
|
||||||
- { os: debian, tag: 10, arch: debian } # EOL 2024
|
- { os: debian, tag: 10, arch: debian, arch_ver: 10 }
|
||||||
- { os: centos, tag: 7, arch: rhel } # EOL June 2024
|
- { os: debian, tag: 11, arch: debian, arch_ver: 11 }
|
||||||
# - { os: centos, tag: 8, arch: rhel } # 8 as of April 2020
|
- { os: centos, tag: 7, arch: rhel, arch_ver: 7 }
|
||||||
- { os: rockylinux, tag: latest, arch: rhel}
|
- { os: rockylinux, tag: 8, arch: rhel, arch_ver: 8 }
|
||||||
# - { os: fedora, tag: latest, arch: rhel } # 31 as of April 2020
|
- { os: oraclelinux, tag: 8, arch: rhel, arch_ver: 8 }
|
||||||
# - { os: fedora, tag: 33, arch: rhel } # feeling confident?
|
- { os: almalinux, tag: 8, arch: rhel, arch_ver: 8 }
|
||||||
# - { os: fedora, tag: rawhide, arch: rhel } # for thrill-seekers only
|
python: [2, 3]
|
||||||
|
|
||||||
#-------- Defaults --------------------------
|
#-------- Defaults --------------------------
|
||||||
include:
|
include:
|
||||||
@ -54,13 +55,14 @@ jobs:
|
|||||||
libxt-dev
|
libxt-dev
|
||||||
libmotif-common
|
libmotif-common
|
||||||
libmotif-dev
|
libmotif-dev
|
||||||
python2.7-dev
|
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
llvm-dev
|
llvm-dev
|
||||||
libclang-dev
|
libclang-dev
|
||||||
libudunits2-dev
|
libudunits2-dev
|
||||||
libgtest-dev
|
libgtest-dev
|
||||||
install_gtest: cd /usr/src/gtest && cmake . && make && cp libgtest* /usr/lib/
|
default-jdk
|
||||||
|
python2.7-dev
|
||||||
|
python3-dev
|
||||||
#-------- RHEL Dependencies ----------------
|
#-------- RHEL Dependencies ----------------
|
||||||
- cfg: { arch: rhel }
|
- cfg: { arch: rhel }
|
||||||
arch_deps: >-
|
arch_deps: >-
|
||||||
@ -80,61 +82,57 @@ jobs:
|
|||||||
udunits2-devel
|
udunits2-devel
|
||||||
which
|
which
|
||||||
zlib-devel
|
zlib-devel
|
||||||
gtest-devel
|
python2-devel
|
||||||
#-------- Ubuntu Only Dependencies ----------------
|
python3-devel
|
||||||
- cfg: { os: ubuntu }
|
#-------- RHEL 7-based Only Dependencies ----------------
|
||||||
os_deps: >-
|
- cfg: { arch: rhel, arch_ver: 7 }
|
||||||
openjdk-11-jdk
|
|
||||||
#-------- Debian OS Only Dependencies ----------------
|
|
||||||
- cfg: { os: debian }
|
|
||||||
os_deps: >-
|
|
||||||
openjdk-11-jdk
|
|
||||||
#-------- CentOS Only Dependencies ----------------
|
|
||||||
- cfg: { os: centos }
|
|
||||||
pkg_mgr: yum
|
pkg_mgr: yum
|
||||||
conf_pkg: yum -y install epel-release && yum -y update
|
conf_pkg: |
|
||||||
|
yum -y install epel-release
|
||||||
|
yum -y update
|
||||||
os_deps: >-
|
os_deps: >-
|
||||||
libX11-devel
|
libX11-devel
|
||||||
libXt-devel
|
libXt-devel
|
||||||
#-------- Fedora Only Dependencies ----------------
|
|
||||||
# - cfg: { os: fedora }
|
|
||||||
# pkg_mgr: dnf
|
|
||||||
# os_deps: >-
|
|
||||||
# swig
|
|
||||||
# perl-Text-Balanced
|
|
||||||
# python-devel
|
|
||||||
# diffutils
|
|
||||||
#-------- 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: >-
|
|
||||||
swig3
|
swig3
|
||||||
python-devel
|
gtest-devel
|
||||||
# - cfg: { os: centos, tag: 8 }
|
#-------- RHEL 8-based Only Dependencies ----------------
|
||||||
# pkg_mgr: dnf
|
- cfg: { arch: rhel, arch_ver: 8 }
|
||||||
# conf_pkg: >
|
|
||||||
# sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-* &&
|
|
||||||
# dnf -y install epel-release &&
|
|
||||||
# dnf -y update &&
|
|
||||||
# dnf install -y 'dnf-command(config-manager)' &&
|
|
||||||
# dnf config-manager --enable powertools
|
|
||||||
# tag_deps: >-
|
|
||||||
# swig
|
|
||||||
# python3-devel diffutils
|
|
||||||
- cfg: { os: rockylinux }
|
|
||||||
pkg_mgr: dnf
|
pkg_mgr: dnf
|
||||||
conf_pkg: >
|
|
||||||
dnf -y install epel-release &&
|
|
||||||
dnf -y update &&
|
|
||||||
dnf install -y 'dnf-command(config-manager)' &&
|
|
||||||
dnf config-manager --enable powertools
|
|
||||||
tag_deps: >-
|
tag_deps: >-
|
||||||
swig
|
swig
|
||||||
python3-devel diffutils
|
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
|
||||||
|
dnf install -y gtest-devel
|
||||||
|
#-------- Debian 10-based Only Dependencies ----------------
|
||||||
|
- cfg: { arch: debian, arch_ver: 10 }
|
||||||
|
install_gtest: |
|
||||||
|
apt-get install -y libgtest-dev
|
||||||
|
cd /usr/src/gtest
|
||||||
|
cmake .
|
||||||
|
make
|
||||||
|
cp libgtest* /usr/lib/
|
||||||
|
#-------- Debian 11-based Only Dependencies ----------------
|
||||||
|
- cfg: { arch: debian, arch_ver: 11 }
|
||||||
|
conf_pkg: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y tzdata
|
||||||
|
install_gtest: |
|
||||||
|
apt-get install -y libgtest-dev
|
||||||
|
cd /usr/src/gtest
|
||||||
|
cmake .
|
||||||
|
make
|
||||||
|
cp lib/libgtest* /usr/lib/
|
||||||
|
#-------- OS and Version Specific Dependencies ----------------
|
||||||
|
- cfg: { os: oraclelinux }
|
||||||
|
install_gtest: |
|
||||||
|
dnf config-manager --enable ol8_codeready_builder
|
||||||
|
dnf install -y gtest-devel
|
||||||
#-------- Job definition ----------------
|
#-------- Job definition ----------------
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container: docker://${{matrix.cfg.os}}:${{matrix.cfg.tag}}
|
container: docker://${{matrix.cfg.os}}:${{matrix.cfg.tag}}
|
||||||
@ -142,16 +140,39 @@ jobs:
|
|||||||
- name: Update Package Manager
|
- name: Update Package Manager
|
||||||
run: ${{matrix.conf_pkg}}
|
run: ${{matrix.conf_pkg}}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: >
|
||||||
${{matrix.pkg_mgr}} ${{matrix.install_cmd}} ${{matrix.deps}} ${{matrix.arch_deps}} ${{matrix.os_deps}} ${{matrix.tag_deps}}
|
${{matrix.pkg_mgr}}
|
||||||
|
${{matrix.install_cmd}}
|
||||||
|
${{matrix.deps}}
|
||||||
|
${{matrix.arch_deps}}
|
||||||
|
${{matrix.os_deps}}
|
||||||
|
${{matrix.tag_deps}}
|
||||||
- name: Install GTest
|
- name: Install GTest
|
||||||
run: ${{matrix.install_gtest}}
|
run: ${{matrix.install_gtest}}
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
- name: Build trick
|
- name: Configure Trick
|
||||||
run: |
|
run: |
|
||||||
export MAKEFLAGS=-j`nproc`
|
export MAKEFLAGS=-j`nproc`
|
||||||
|
export PYTHON_VERSION=${{matrix.python}}
|
||||||
./configure
|
./configure
|
||||||
|
- name: Build Trick
|
||||||
|
run: |
|
||||||
|
export MAKEFLAGS=-j`nproc`
|
||||||
make
|
make
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make test
|
run: make test
|
||||||
|
|
||||||
|
# Uncomment for build artifacts
|
||||||
|
# - name: Upload Trick Build
|
||||||
|
# uses: actions/upload-artifact@v3.0.0
|
||||||
|
# with:
|
||||||
|
# name: Trick_${{matrix.cfg.os}}${{matrix.cfg.tag}}
|
||||||
|
# path: |
|
||||||
|
# bin
|
||||||
|
# include
|
||||||
|
# lib
|
||||||
|
# share
|
||||||
|
# libexec
|
||||||
|
# retention-days: 1
|
||||||
|
|
||||||
|
@ -420,7 +420,7 @@ AC_ARG_WITH(
|
|||||||
PYTHON_HOME="$withval"
|
PYTHON_HOME="$withval"
|
||||||
AC_PATH_PROGS(PYTHON, python${PYTHON_VERSION} python python3, nopython, "$PYTHON_HOME")
|
AC_PATH_PROGS(PYTHON, python${PYTHON_VERSION} python python3, nopython, "$PYTHON_HOME")
|
||||||
AS_IF(
|
AS_IF(
|
||||||
[test "$ac_cv_path_PYTHON" = "nopython"],
|
[test "$ac_cv_path_PYTHON" = "" || test "$ac_cv_path_PYTHON" = "nopython"],
|
||||||
AC_MSG_ERROR([could not find python<version> python or python3 in the specefied path. Please install the python development package]),
|
AC_MSG_ERROR([could not find python<version> python or python3 in the specefied path. Please install the python development package]),
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
@ -428,7 +428,7 @@ AC_ARG_WITH(
|
|||||||
PYTHON_MAJOR=`${PYTHON} -c 'import sys; print(str(sys.version_info[[0]]))'`
|
PYTHON_MAJOR=`${PYTHON} -c 'import sys; print(str(sys.version_info[[0]]))'`
|
||||||
AC_PATH_PROGS(PYTHON_CONFIG, python${PYTHON_MAJORMINOR}-config python${PYTHON_MAJOR}-config python${PYTHON_VERSION}-config python-config, nopython-config, "$PYTHON_HOME")
|
AC_PATH_PROGS(PYTHON_CONFIG, python${PYTHON_MAJORMINOR}-config python${PYTHON_MAJOR}-config python${PYTHON_VERSION}-config python-config, nopython-config, "$PYTHON_HOME")
|
||||||
AS_IF(
|
AS_IF(
|
||||||
[test "$ac_cv_path_PYTHON_CONFIG" = "nopython-config"],
|
[test "$ac_cv_path_PYTHON_CONFIG" = "" || test "$ac_cv_path_PYTHON_CONFIG" = "nopython-config"],
|
||||||
AC_MSG_ERROR([could not find python<major>-config python<major.minor>-config or python-config in the specified path. Please install the python development package]),
|
AC_MSG_ERROR([could not find python<major>-config python<major.minor>-config or python-config in the specified path. Please install the python development package]),
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
@ -436,7 +436,7 @@ AC_ARG_WITH(
|
|||||||
[
|
[
|
||||||
AC_PATH_PROGS(PYTHON, python${PYTHON_VERSION} python python3, nopython)
|
AC_PATH_PROGS(PYTHON, python${PYTHON_VERSION} python python3, nopython)
|
||||||
AS_IF(
|
AS_IF(
|
||||||
[test "$ac_cv_path_PYTHON" = "nopython"],
|
[test {"$ac_cv_path_PYTHON" = "" || test "${ac_cv_path_PYTHON}" = "nopython"}],
|
||||||
AC_MSG_ERROR([could not find python<version> python or python3. Please install the python development package]),
|
AC_MSG_ERROR([could not find python<version> python or python3. Please install the python development package]),
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
@ -444,7 +444,7 @@ AC_ARG_WITH(
|
|||||||
PYTHON_MAJOR=`${PYTHON} -c 'import sys; print(str(sys.version_info[[0]]))'`
|
PYTHON_MAJOR=`${PYTHON} -c 'import sys; print(str(sys.version_info[[0]]))'`
|
||||||
AC_PATH_PROGS(PYTHON_CONFIG, python${PYTHON_MAJORMINOR}-config python${PYTHON_MAJOR}-config python${PYTHON_VERSION}-config python-config, nopython-config)
|
AC_PATH_PROGS(PYTHON_CONFIG, python${PYTHON_MAJORMINOR}-config python${PYTHON_MAJOR}-config python${PYTHON_VERSION}-config python-config, nopython-config)
|
||||||
AS_IF(
|
AS_IF(
|
||||||
[test "$ac_cv_path_PYTHON_CONFIG" = "nopython-config"],
|
[test "$ac_cv_path_PYTHON_CONFIG" = "" || test "$ac_cv_path_PYTHON_CONFIG" = "nopython-config"],
|
||||||
AC_MSG_ERROR([could not find python<major>-config python<major.minor>-config or python-config. Please install the python development package]),
|
AC_MSG_ERROR([could not find python<major>-config python<major.minor>-config or python-config. Please install the python development package]),
|
||||||
[]
|
[]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user