1.3.0-rc1 #656
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu CI full build | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- release/* | |
- ci/* | |
- dependabot/* | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2.3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-tests.txt | |
pip install -r requirements-ui.txt | |
- name: Install mandatory system libraries | |
run: | | |
sudo apt-get update --fix-missing | |
sudo apt-get install libtbb-dev | |
- uses: lukka/get-cmake@latest | |
with: | |
useLocalCache: false | |
useCloudCache: true | |
- name: Update alternatives | |
#mpicxx uses "g++" so we need g++ to be symbolic link to g++-10 | |
run: | | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 | |
sudo update-alternatives --set cc /usr/bin/gcc | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 | |
sudo update-alternatives --set c++ /usr/bin/g++ | |
- name: Read antares-xpansion version | |
id: antares-xpansion-version | |
uses: ./.github/actions/read-json-value | |
with: | |
path: 'antares-version.json' | |
key: 'antares_xpansion_version' | |
- run: | | |
mkdir -p ${{ github.workspace }}/vcpkg_cache | |
- name: vcpkg install | |
run: | | |
pushd vcpkg | |
git fetch --unshallow | |
./bootstrap-vcpkg.sh | |
popd | |
vcpkg/vcpkg install | |
- name: Configure | |
run: | | |
cmake -B _build -S . \ | |
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_INSTALL_PREFIX=_install \ | |
-DBUILD_UI=ON \ | |
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake | |
- name: Build | |
run: | | |
cmake --build _build --config Release -j$(nproc) | |
cd _build | |
cmake --install . | |
- name: Running unit tests | |
run: | | |
export PATH=${GITHUB_WORKSPACE}/vcpkg_installed/x64-linux/tools/openmpi/bin/:$PATH | |
cd _build | |
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" | |
- id: create-single-file | |
name: Single file .tar.gz creation | |
uses: ./.github/workflows/single-file-creation-tgz | |
with: | |
antares-xpansion-version: ${{steps.antares-xpansion-version.outputs.result}} | |
- name: Installer .tar.gz creation | |
run: | | |
cd _build | |
cpack -G TGZ |