Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Branch 8.8: Use vcpkg #2549

Merged
merged 53 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 52 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
16bbe71
add vcpkg json and triplet
payetvin Dec 26, 2024
943422e
ubuntu job
payetvin Dec 26, 2024
d40fd98
Merge branch 'release/8.8.x' into feature/8.8-vcpkg
payetvin Dec 26, 2024
6a39a74
add ports, fix cmake error
payetvin Dec 26, 2024
bee276a
remove antares deps in main cmakelists, try fix wxwidgets
payetvin Dec 26, 2024
eef6444
fix parenthesis
payetvin Dec 26, 2024
0e11e62
remove old vcpkg cache ubuntu
payetvin Dec 26, 2024
3ad2886
sonarcloud jojb
payetvin Dec 26, 2024
28ef39c
remove antares deps from download precompiled job
payetvin Dec 27, 2024
60ee0ef
windows job
payetvin Dec 27, 2024
cf69f63
dowload zip action
payetvin Dec 27, 2024
9e86f87
indent windows vcpkg
payetvin Dec 27, 2024
caff47f
windows
payetvin Dec 27, 2024
6524892
use windows-vcpkg from develop
payetvin Dec 27, 2024
1f21186
fix windows job
payetvin Dec 27, 2024
77338c0
try previous boost version
payetvin Dec 27, 2024
d0a1290
revert boost versin
payetvin Dec 27, 2024
c70d9bb
use boost 1.72
payetvin Dec 27, 2024
54bbfc9
revert boost
payetvin Dec 27, 2024
34eded9
remove antares deps from git modules
payetvin Dec 27, 2024
7fe3bee
ubuntu job
payetvin Dec 27, 2024
61013c1
remove deps from download extract
payetvin Dec 27, 2024
6f7dc09
boost test version 1.81
payetvin Dec 27, 2024
a7419a5
change cache key
payetvin Dec 27, 2024
7512210
remove vcpkg package from windows job
payetvin Dec 27, 2024
b861de4
revert last commit
payetvin Dec 27, 2024
1b48ab2
use develop ubuntu.yml
payetvin Dec 30, 2024
b16a593
use develop centos and oracle 8
payetvin Dec 30, 2024
e7cedb8
activate centos and oracle jobs on this branch
payetvin Dec 30, 2024
64e785c
solver-8.8 for oracle
payetvin Dec 30, 2024
aefa052
solver-8.8 for windows and ubuntu
payetvin Dec 30, 2024
00306cf
add docker/ from develop
payetvin Dec 30, 2024
f47de12
remove api tests
payetvin Dec 30, 2024
ac8d763
update action version, cmake action
payetvin Dec 30, 2024
be64019
remove init test nr from ubuntu
payetvin Dec 30, 2024
f56f1bc
solver 8-8 for centos in dockerfile
payetvin Dec 30, 2024
bae030d
rm tests related to ts generator exe
payetvin Dec 30, 2024
133f602
type in centos dockerfile
payetvin Dec 30, 2024
64c7b76
centos and oracle8 OK
payetvin Dec 30, 2024
4bee611
sonarcloud versions
payetvin Dec 30, 2024
73bd1dc
use same vcpkg version
payetvin Dec 30, 2024
66617f0
remove 9.1 9.2 tests in windows
payetvin Dec 30, 2024
4a4e919
remove test nr init
payetvin Dec 30, 2024
3fba2e4
Merge, fix conflicts in CI files
payetvin Jan 6, 2025
9d2c018
checkout vcpkg to b322364f, update vcpkg.json
payetvin Jan 6, 2025
5298ef2
update new_release.yml
payetvin Jan 6, 2025
14256a7
remove antares-deps-version.json
payetvin Jan 6, 2025
5863bff
update build-userguide
payetvin Jan 6, 2025
0d01065
rc4
payetvin Jan 6, 2025
32602f6
remove cucumber tests
payetvin Jan 6, 2025
aecd5a8
remove antares-deps directory
payetvin Jan 6, 2025
691807b
simtest 8.8.12
payetvin Jan 6, 2025
1e08c60
Change error message for sirius not found
payetvin Jan 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/build-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ on:
push:
branches:
- release/*
- feature/*
- features/*
- fix/*
- issue-*
- doc/*
- dependabot/*
workflow_call:
inputs:
run-tests:
required: true
type: boolean
type: string
target_branch:
required: true
type: string

env:
IS_RELEASE: ${{ github.event_name == 'workflow_dispatch' }}
Expand All @@ -24,10 +32,12 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.target_branch}}

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand All @@ -52,7 +62,7 @@ jobs:
echo "PDF_PATH_ASSET= [\"docs/pdf-doc-generation-with-sphinx/$PDF_NAME\"]" >> $GITHUB_ENV

- name: user guide upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pdf-reference-guide
path: ${{ env.PDF_PATH }}
Expand All @@ -65,4 +75,3 @@ jobs:
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" ${{ env.PDF_PATH }}

82 changes: 0 additions & 82 deletions .github/workflows/centos7-system-deps-build.yml

This file was deleted.

194 changes: 100 additions & 94 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: Centos7 CI (push and/or release)

on:
release:
types: [created]
types: [ created ]
push:
branches:
- develop
- dependabot/*
schedule:
- cron: '21 2 * * *'
workflow_call:
Expand All @@ -28,102 +29,107 @@ jobs:

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 ${{ env.REF }} .

- name: Install gcc 11
run: |
yum install -y centos-release-scl
yum install -y devtoolset-11-gcc*

- uses: ./.github/workflows/install-cmake-328

- name: Init submodule
run: |
git submodule update --init --remote 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: Config OR-Tools URL
run: |
echo "URL_ORTOOLS=https://github.com/rte-france/or-tools-rte/releases/download/$(cat ortools_tag)/ortools_cxx_centos7_static_sirius.zip" >> $GITHUB_ENV

- name: Download OR-Tools
id: ortools
run: |
mkdir -p ${{ env.ORTOOLSDIR }} && cd ${{ env.ORTOOLSDIR }}
wget -q -O ortools.zip ${{ env.URL_ORTOOLS }}
unzip -q ortools.zip
rm ortools.zip

- name: Install gh if needed
if: ${{ env.IS_RELEASE == 'true' }}
run: |
wget https://github.com/cli/cli/releases/download/v2.52.0/gh_2.52.0_linux_amd64.rpm
rpm -i gh_2.52.0_linux_amd64.rpm
gh --version

- name: Configure
run: |
source /opt/rh/devtoolset-11/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_TOOLS=ON \
-DBUILD_UI=OFF \
-DCMAKE_PREFIX_PATH=${{ env.ORTOOLSDIR }}/install \

- name: Build
run: |
source /opt/rh/devtoolset-11/enable
source /opt/rh/rh-git227/enable
cmake --build _build --config Release -j$(nproc)
ccache -s

- name: Installer .rpm creation
run: |
cd _build
cpack -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
cpack -G TGZ

- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.tar.gz _build/*.rpm

#sparse checkout -- only needed files
- uses: actions/checkout@v4
with:
fetch-depth: 0
sparse-checkout: |
docker
src/vcpkg.json
ref: ${{ env.REF }}

- name: set env variables -- DockerFiles
run: |
echo "DOCKERFILE=$(pwd)/docker/Dockerfile" >> $GITHUB_ENV
echo "DOCKERDIR=$(pwd)/docker" >> $GITHUB_ENV



- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
docker/AntaresDeps

- name: Docker file push
id: docker_push

if: steps.changed-files.outputs.any_changed == 'true'
uses: elgohr/Publish-Docker-Github-Action@main
with:
name: antaresrte/antaressystemdeps
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: ${{ env.DOCKERDIR }}
dockerfile: ${{ env.DOCKERDIR }}/AntaresDeps
cache: false
tags: latest

- name: create vcpkg cache dir
run: |
echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV
mkdir -p ${{ github.workspace }}/vcpkg_cache


- name: Restore vcpkg binary dir from cache
id: cache-vcpkg-binary
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}/vcpkg_cache
key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}
# Allows to restore a cache when deps have only partially changed (like adding a dependency)
restore-keys: vcpkg-cache-centos7-

- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
key: centos7-on-${{ runner.os }}


- name: Build the image and Antares
run: |
ls -latr .ccache/ && \
docker build \
-t antares:centos7 \
--build-arg="BRANCH=${{ env.REF }}" \
--build-arg="NPROC=$(nproc)" \
--build-arg="VCPKG_CACHE_DIR=./vcpkg_cache" \
--build-arg CCACHE_DIR=./.ccache \
--build-arg CCACHE_KEY=centos7-on-${{ runner.os }} \
-f ${{ env.DOCKERFILE }} .


- name: create a container without starting it && retrieve the .tgz
run: |
container_id=$(docker create antares:centos7)
docker cp $container_id:/workspace/Antares_Simulator/_build/archive archive
docker cp $container_id:/workspace/vcpkg_cache ${{ env.VCPKG_CACHE_DIR }}
docker cp $container_id:/workspace/.ccache/. .ccache
ls -la .ccache
docker rm $container_id


- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" archive/*.tar.gz archive/*.rpm


- name: Cache vcpkg binary dir
if: always()
id: save-cache-vcpkg-binary
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vcpkg_cache
key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}

Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: "Download extract .tgz precompiled libraries"
description: "Download and extract .tgz precompiled libraries from antares-deps and antares-simulator repository"
inputs:
antares-deps-version:
description: 'antares-deps version'
required: true
os:
description: 'operational system used for github action'
required: true
Expand All @@ -20,18 +16,11 @@ inputs:

runs:
using: "composite"
steps:
- name: Download & extract antares-deps
shell: bash
run: |
wget https://github.com/AntaresSimulatorTeam/antares-deps/releases/download/v${{inputs.antares-deps-version}}/rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz
tar -xvf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz
rm -rf rte-antares-deps-${{inputs.os}}-${{inputs.buildtype}}.tar.gz

steps:
- name: Download & extract OR-Tools
shell: bash
run: |
mkdir ${{inputs.ortools-dir}}
mkdir -p ${{inputs.ortools-dir}}
cd ${{inputs.ortools-dir}}
wget ${{inputs.ortools-url}} -O ortools.zip
unzip ortools.zip
Expand Down
Loading
Loading