Skip to content

Commit

Permalink
All worflows
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal25 committed Jun 5, 2024
1 parent 536efc7 commit f0aecc3
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 41 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin
XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools

steps:
- run: |
Expand All @@ -98,6 +99,10 @@ jobs:
id: get_release
uses: bruceadams/[email protected]

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- uses: actions/checkout@v3 #Keep at 3
with:
submodules: true
Expand Down Expand Up @@ -152,6 +157,8 @@ jobs:
antares-version: ${{needs.versions.outputs.antares-version}}
os: centos7
os-full-name: CentOS-7.9.2009
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Compile tbb
uses: ./.github/workflows/compile-tbb
Expand All @@ -168,8 +175,6 @@ jobs:
pushd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
popd
vcpkg/vcpkg install
- name: Configure
run: |
Expand All @@ -180,8 +185,8 @@ jobs:
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \
-DBUILD_UI=ON \
-DXPRESS=${{ env.XPRESS_VALUE }} \
-DALLOW_RUN_AS_ROOT=ON \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/build_oracle8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress
XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin
XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools

steps:
- name: Install System
Expand All @@ -72,6 +73,10 @@ jobs:
source /opt/rh/gcc-toolset-10/enable
echo $PATH >> $GITHUB_PATH
- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- run: |
dnf module install -y nodejs:20/common
Expand Down Expand Up @@ -108,6 +113,8 @@ jobs:
antares-version: ${{needs.versions.outputs.antares-version}}
os: Oracle8
os-full-name: OracleServer-8.9
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Compile TBB
uses: ./.github/workflows/compile-tbb
Expand All @@ -120,8 +127,6 @@ jobs:
pushd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
popd
vcpkg/vcpkg install
- name: Configure
run: |
Expand All @@ -131,8 +136,8 @@ jobs:
-DBUILD_TESTING=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \
-DBUILD_UI=OFF \
-DXPRESS=${{ env.XPRESS_VALUE }} \
-DALLOW_RUN_AS_ROOT=ON \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ jobs:
-DCMAKE_INSTALL_PREFIX=_install \
-DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \
-DBUILD_UI=ON \
-DXPRESS=${{ env.XPRESS_VALUE }} \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
- name: Build
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,17 @@ jobs:
XPRS_LIB_Path: ${{ github.workspace }}\xpress\lib
# Indicates the location of the vcpkg as a Git submodule of the project repository.
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Checkout xpressmp linux
if: matrix.xprs.value == 'XPRESS-ON'
uses: actions/checkout@v4
Expand Down Expand Up @@ -108,10 +113,6 @@ jobs:
cd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
vcpkg install --triplet ${{matrix.triplet}}
rm -rf buildtrees
rm -rf packages
rm -rf downloads
shell: bash

- name: Compile tbb
Expand All @@ -125,6 +126,8 @@ jobs:
antares-deps-version: ${{steps.antares-deps-version.outputs.result}}
antares-version: ${{steps.antares-version.outputs.result}}
os: ${{matrix.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Expand xpress value in env
#I can't seem to expand the variable in the cmake command line so export it in env
Expand All @@ -136,7 +139,7 @@ jobs:
- name: Configure
run: |
$pwd=Get-Location
cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DXPRESS=${{ env.XPRESS_VALUE }}
cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install
- name: Build
run: |
cmake --build _build --config Release -j4
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/centos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ jobs:
XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress
XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin
XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools
outputs:
zip_name: ${{ steps.zip_name.outputs.zip_name }}
singlefile_name: ${{ steps.zip_name.outputs.singlefile_name }}
Expand All @@ -146,13 +147,19 @@ jobs:
with:
cmake-version: '3.28.x'

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
with:
antares-deps-version: ${{needs.versions.outputs.antares-deps-version}}
antares-version: ${{needs.versions.outputs.antares-version}}
os: centos7
os-full-name: CentOS-7.9.2009
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Compile tbb
uses: ./.github/workflows/compile-tbb
Expand Down Expand Up @@ -202,8 +209,6 @@ jobs:
pushd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
popd
vcpkg/vcpkg install
- name: Configure
shell: bash
Expand All @@ -221,7 +226,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=_install \
-DBUILD_UI=ON \
-DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" \
-DXPRESS=${XPRESS_VALUE} \
-DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \
-DALLOW_RUN_AS_ROOT=ON \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/centos7-system-deps-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ jobs:
pushd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
popd
vcpkg/vcpkg install
- name: Configure
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,32 @@ inputs:
description: 'extra qualifiers'
required: false
default: ""
ortools-url:
description: 'URL for OR-Tools'
required: true
ortools-dir:
description: 'Destination directory for OR-Tools'
required: true

runs:
using: "composite"
steps:
- id: download-extract
shell: bash
run: |
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
unzip rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${{inputs.antares-version}}-installer-64bits.zip
unzip rte-antares-${{inputs.antares-version}}-installer-64bits.zip
rm -rf rte-antares-${{inputs.antares-version}}-installer-64bits.zip
steps:
- id: download-extract
shell: bash
run: |
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
unzip rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.zip
wget https://github.com/AntaresSimulatorTeam/Antares_Simulator/releases/download/v${{inputs.antares-version}}/rte-antares-${{inputs.antares-version}}-installer-64bits.zip
unzip rte-antares-${{inputs.antares-version}}-installer-64bits.zip
rm -rf rte-antares-${{inputs.antares-version}}-installer-64bits.zip
- name: Download & extract OR-Tools
shell: bash
run: |
mkdir "${{inputs.ortools-dir}}"
cd "${{inputs.ortools-dir}}"
wget ${{inputs.ortools-url}} -O ortools.zip
unzip ortools.zip
rm ortools.zip
12 changes: 8 additions & 4 deletions .github/workflows/ol8-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress
XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin
XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools
outputs:
zip_name: ${{ steps.zip_name.outputs.zip_name }}
singlefile_name: ${{ steps.zip_name.outputs.singlefile_name }}
Expand All @@ -115,6 +116,10 @@ jobs:
- run: |
dnf module install -y nodejs:20/common
- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- uses: lukka/get-cmake@latest
with:
useLocalCache: false
Expand All @@ -128,8 +133,6 @@ jobs:
pushd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
popd
vcpkg/vcpkg install
- name: Download pre-compiled librairies
uses: ./.github/workflows/download-extract-precompiled-libraries-tgz
Expand All @@ -138,7 +141,8 @@ jobs:
antares-version: ${{needs.versions.outputs.antares-version}}
os: oracle8
os-full-name: OracleServer-8.9
#variant: -ortools-xpress
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Compile tbb
uses: ./.github/workflows/compile-tbb
Expand Down Expand Up @@ -184,7 +188,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=_install \
-DBUILD_UI=ON \
-DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" \
-DXPRESS=${XPRESS_VALUE} \
-DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install \
-DALLOW_RUN_AS_ROOT=ON \
-DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows-vcpkg-deps-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ jobs:
cd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
vcpkg install --triplet ${{matrix.triplet}}
rm -rf buildtrees
rm -rf packages
rm -rf downloads
shell: bash

- name: Compile tbb
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
XPRS_LIB_Path: ${{ github.workspace }}\xpress\lib
# Indicates the location of the vcpkg as a Git submodule of the project repository.
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: $GITHUB_WORKSPACE/or-tools
outputs:
zip_name: ${{ steps.zip_name.outputs.zip_name }}
singlefile_name: ${{steps.zip_name.outputs.singlefile_name}}
Expand All @@ -92,6 +93,10 @@ jobs:
uses:
bruceadams/get-release@main

- name: Config OR-Tools URL
run: |
echo "ORTOOLS_URL=https://github.com/rte-france/or-tools/releases/download/v9.8-rte1.0/ortools_cxx_ubuntu-20.04_static_sirius.zip" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -153,10 +158,6 @@ jobs:
cd vcpkg
git fetch --unshallow
./bootstrap-vcpkg.sh
vcpkg install --triplet ${{matrix.triplet}}
rm -rf buildtrees
rm -rf packages
rm -rf downloads
shell: bash

- name: Compile tbb
Expand All @@ -170,6 +171,8 @@ jobs:
antares-deps-version: ${{steps.antares-deps-version.outputs.result}}
antares-version: ${{steps.antares-version.outputs.result}}
os: ${{matrix.os}}
ortools-url: ${{env.ORTOOLS_URL}}
ortools-dir: ${{env.ORTOOLS_DIR}}

- name: Download userguide
uses: actions/download-artifact@v4
Expand All @@ -188,7 +191,7 @@ jobs:
#Inverted ternary : @({'condition is false'},{'condition is true'})[$condition] => ({true}, {false})[!$condition]
run: |
$pwd=Get-Location
cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" -DXPRESS=${{ env.XPRESS_VALUE }}
cmake -B _build -S . -DDEPS_INSTALL_DIR=rte-antares-deps-Release -DCMAKE_PREFIX_PATH="$pwd\rte-antares-${{steps.antares-version.outputs.result}}-installer-64bits" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DCMAKE_INSTALL_PREFIX=_install -DBUILD_UI=ON -DUSER_GUIDE_PATH="docs/${{ needs.userguide.outputs.pdf-name }}" -DCMAKE_PREFIX_PATH=${{env.ORTOOLS_DIR}}/install
- name: Build
run: |
Expand Down

0 comments on commit f0aecc3

Please sign in to comment.