diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 5eb91e9..cb389b3 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -11,8 +11,9 @@ env: OCCT_VERSION: 7.8.1 CGAL_VERSION: 5.6.1 EIGEN_VERSION: 3.4.0 - ASI_VERSION: 2024.1 - RAPIDJSON_VERSION: 1.1.0 + ASI_VERSION: fc7818a4 + ASI_VERSION_MODE: commit + RAPIDJSON_VERSION: "1.1.0=hdb19cb5_1" NVM_VERSION: 0.39.7 jobs: @@ -24,7 +25,6 @@ jobs: env: IMAGE_NAME: ubuntu-occt-asi-cgal-eigen-node - OCCT_VERSION: 7.7.2 strategy: matrix: @@ -55,8 +55,9 @@ jobs: nvm_version=${{ env.NVM_VERSION }} rapidjson_version=${{ env.RAPIDJSON_VERSION }} asi_version=${{ env.ASI_VERSION }} + asi_version_mode=${{ env.ASI_VERSION_MODE }} tags: | - ghcr.io/michsior14/${{ env.IMAGE_NAME }}:node-${{matrix.node}} + ghcr.io/michsior14/${{ env.IMAGE_NAME }}:node-${{matrix.node}}${{ env.ASI_VERSION_MODE == 'commit' && format('-{0}', env.ASI_VERSION) || ''}} ghcr.io/michsior14/${{ env.IMAGE_NAME }}:${{ env.UBUNTU_VERSION }}-occt-${{ env.OCCT_VERSION }}-asi-${{ env.ASI_VERSION }}-cgal-${{ env.CGAL_VERSION }}-eigen-${{ env.EIGEN_VERSION }}-node-${{ matrix.node }} build-ubuntu-occt-cgal-eigen-node: diff --git a/tools/ubuntu-occt-asi-cgal-eigen-node/Dockerfile b/tools/ubuntu-occt-asi-cgal-eigen-node/Dockerfile index 1666bff..a533c1f 100644 --- a/tools/ubuntu-occt-asi-cgal-eigen-node/Dockerfile +++ b/tools/ubuntu-occt-asi-cgal-eigen-node/Dockerfile @@ -1,19 +1,30 @@ ARG ubuntu_version=22.04 ARG node_version=20 -ARG occt_version=7.7.2 +ARG occt_version=7.8.1 ARG cgal_version=5.6.1 ARG eigen_version=3.4.0 ARG nvm_version=0.39.7 -ARG rapidjson_version=1.1.0 -ARG asi_version=2024.1 +ARG rapidjson_version="1.1.0=hdb19cb5_1" +ARG asi_version=fc7818a4 +ARG asi_version_mode=commit + +# Conditional setup of the asi version based on commit or release +FROM continuumio/miniconda3:latest as build-base + +FROM build-base as build-release +ARG asi_version +ONBUILD ENV ASI_VERSION v${asi_version} + +FROM build-base as build-commit +ARG asi_version +ONBUILD ENV ASI_VERSION ${asi_version} # Conda temporary image -FROM continuumio/miniconda3:latest as conda +FROM build-${asi_version_mode} as conda ARG cgal_version ARG occt_version ARG eigen_version ARG rapidjson_version -ARG asi_version ENV PATH /opt/conda/bin:$PATH @@ -32,8 +43,8 @@ WORKDIR /sources # Build Analysis Situs RUN mkdir /sources/analysis-situs -RUN wget https://gitlab.com/ssv/AnalysisSitus/-/archive/v$asi_version/AnalysisSitus-v$asi_version.tar.gz -RUN tar zxvf AnalysisSitus-v$asi_version.tar.gz --strip-components=1 -C /sources/analysis-situs +RUN wget https://gitlab.com/ssv/AnalysisSitus/-/archive/$ASI_VERSION/AnalysisSitus-$ASI_VERSION.tar.gz +RUN tar zxvf AnalysisSitus-$ASI_VERSION.tar.gz --strip-components=1 -C /sources/analysis-situs WORKDIR /sources/analysis-situs @@ -60,8 +71,8 @@ RUN cmake .. \ -DUSE_INSTANT_MESHES=off \ -DUSE_NETGEN=off \ -DUSE_THREADING=off -RUN make -j8 -RUN make -j8 install +RUN make -j $(nproc) +RUN make -j $(nproc) install # Target image FROM "ubuntu:$ubuntu_version"