Skip to content

Use CMake 3.22

Use CMake 3.22 #2747

Workflow file for this run

name: Centos7 CI (push and/or release)
on:
release:
types: [created]
push:
branches:
- develop
- feature/*
- features/*
- fix/*
- issue-*
- release/*
- doc/*
env:
GITHUB_TOKEN: ${{ github.token }}
IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }}
IS_PUSH: ${{ github.event_name == 'push' }}
jobs:

Check failure on line 22 in .github/workflows/centos7.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/centos7.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
build:
name: Build
env:
ORTOOLSDIR: ${{ github.workspace }}/or-tools
runs-on: ubuntu-latest
container: 'antaresrte/rte-antares:centos7-simulator-no-deps'
steps:
- 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 src/tests/resources/Antares_Simulator_Tests
- name: Download & extract precompiled deps at root
run: |
ANTARES_DEPS_VERSION=$(cut -d'"' -f4 antares-deps-version.json | grep -Ev '\{|\}')
cd /
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${ANTARES_DEPS_VERSION}/rte-antares-deps-centos7-Release.tar.gz
tar -xvf rte-antares-deps-centos7-Release.tar.gz
rm -rf rte-antares-deps-centos7-Release.tar.gz
- name: Remove cmake3
run: yum remove -y cmake3
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.22.x'
- name: Configure
run: |
source /opt/rh/devtoolset-9/enable
cmake -B _build -S src \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DDEPS_INSTALL_DIR=/rte-antares-deps-Release \
-DCMAKE_BUILD_TYPE=release \
-DBUILD_TESTING=ON \
-DBUILD_not_system=OFF \
-DBUILD_ortools=ON
- name: Build
run: |
source /opt/rh/devtoolset-9/enable
source /opt/rh/rh-git227/enable
cmake --build _build --config Release -j2
ccache -s
- name: Installer .rpm creation
run: |
cd _build
cpack3 -G RPM
- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_centos7.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install
- name: .tar.gz creation
run: |
cd _build
cpack3 -G TGZ
- name: Installer TGZ push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz
- name: Installer RPM push
uses: actions/upload-artifact@v3
with:
path: _build/*.rpm
publish_assets:
name: Publish assets
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.rpm"]'