diff --git a/.github/workflows/centos.yml b/.github/workflows/centos.yml index 1fa10c3..f543301 100644 --- a/.github/workflows/centos.yml +++ b/.github/workflows/centos.yml @@ -49,11 +49,6 @@ jobs: echo "appendix=$APPENDIX" >> $GITHUB_OUTPUT echo "appendix_with_shared=$APPENDIX_WITH_SHARED" >> $GITHUB_OUTPUT - # Fill variable ${BRANCH_NAME} - - name: Get branch names - id: branch-names - uses: tj-actions/branch-names@v8 - - name: Checkout OR-Tools if: ${{ env.RELEASE_CREATED == 'false' }} run: | @@ -81,13 +76,14 @@ jobs: --build-arg="SIRIUS=${{ matrix.sirius }}" \ --build-arg="SHARED=${{ matrix.shared }}" \ --build-arg="SIRIUS_RELEASE_TAG=${{ env.SIRIUS_RELEASE_TAG }}" \ + --build-arg="INSTALL_PATH=/my_build/install" -f docker/centos.dockerfile . - name: retrieve install from docker run: | container_id=$(docker create centos:shared-${{ matrix.shared }}-sirius-${{ matrix.sirius }}) rm -rf ./install - docker cp $container_id:/home/project/build/install ./install + docker cp $container_id:/my_build/install ./install docker rm $container_id - name: Prepare OR-Tools install @@ -100,7 +96,7 @@ jobs: echo "archive_path=$ARCHIVE_PATH" >> $GITHUB_OUTPUT - name: Upload OR-Tools install artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.or-install.outputs.archive_name }} path: ${{ steps.or-install.outputs.archive_path }} diff --git a/docker/centos.dockerfile b/docker/centos.dockerfile index b7edb7f..2afbd23 100644 --- a/docker/centos.dockerfile +++ b/docker/centos.dockerfile @@ -29,9 +29,7 @@ RUN wget -q "https://cmake.org/files/v3.28/cmake-3.28.3-linux-x86_64.sh" \ CMD [ "/usr/bin/bash" ] ARG SIRIUS_RELEASE_TAG=antares-integration-v1.4 -ARG SIRIUS=OFF -ARG SHARED=ON -ARG BUILD_EXAMPLES=OFF + # Download Sirius RUN cd /applis &&\ zipfile=centos-7_sirius-solver.zip &&\ @@ -54,6 +52,10 @@ RUN cd /applis &&\ ln -s $XPRESS_DIR/lib/libxprs.so.42 $XPRESS_DIR/lib/libxprs.so FROM base AS devel +ARG SIRIUS=OFF +ARG SHARED=ON +ARG BUILD_EXAMPLES=OFF +ARG INSTALL_PATH=/build/install WORKDIR /home/project COPY . . FROM devel AS build @@ -62,7 +64,7 @@ RUN cmake -S. -Bbuild \ -DBUILD_SHARED_LIBS=${SHARED} \ -DUSE_SIRIUS=${SIRIUS}\ -DBUILD_EXAMPLES=${BUILD_EXAMPLES}\ - -DCMAKE_INSTALL_PREFIX="build/install" \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \ -DBUILD_SAMPLES=OFF \ -DBUILD_FLATZINC=OFF \ -Dsirius_solver_DIR="$SIRIUS_CMAKE_DIR"