Skip to content

Centos7 CI (deps. compilation) #697

Centos7 CI (deps. compilation)

Centos7 CI (deps. compilation) #697

name: Centos7 CI (deps. compilation)
on:
schedule:
- cron: '21 2 * * 1'
jobs:
build:
runs-on: ubuntu-latest
container: 'centos:7'
steps:
- name: Set up Python
run: |
yum update -y
yum install -y python3 python3-pip
- name: Install libraries
run: |
yum install -y epel-release
yum install -y git redhat-lsb-core gcc gcc-c++ make wget centos-release-scl scl-utils rpm-build
yum install -y devtoolset-9
yum install -y rh-git227-git
yum install -y unzip libuuid-devel wxGTK3-devel boost-test boost-devel
- name: Install cmake
run: |
wget https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-linux-x86_64.tar.gz
tar xvf cmake-3.25.3-linux-x86_64.tar.gz -C /
echo "/cmake-3.25.3-linux-x86_64/bin" >> $GITHUB_PATH
rm cmake-3.25.3-linux-x86_64.tar.gz
- name: Checkout
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git -b $GITHUB_REF_NAME .
- name: Init submodule
run: |
git submodule update --init --recursive src/antares-deps
- name: Install dependencies
run: |
pip3 install -r src/tests/examples/requirements.txt
- name: Configure
run: |
source /opt/rh/devtoolset-9/enable
#git 2.x must be enabled for Coin compilation with CMake ExternalProject_Add
source /opt/rh/rh-git227/enable
cmake -B _build -S src -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
- name: Build
run: |
source /opt/rh/devtoolset-9/enable
source /opt/rh/rh-git227/enable
cmake --build _build --config release -j$(nproc)
- name: Installer .rpm creation
run: |
cd _build
cpack -G RPM
- name: Installer .tar.gz creation
run: |
cd _build
cpack -G TGZ
- name: Installer archive upload
uses: actions/upload-artifact@v3
with:
name: antares-centos7-archive
path: _build/*.tar.gz
- name: Installer rpm upload
uses: actions/upload-artifact@v3
with:
name: antares-centos7-rpm
path: _build/*.rpm