Skip to content

Commit

Permalink
define install path for docker centos
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Jul 18, 2024
1 parent 6bd5a2c commit cf5a0df
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 6 additions & 4 deletions docker/centos.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&\
Expand All @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit cf5a0df

Please sign in to comment.