Skip to content

Commit

Permalink
feat: allow building asi image from commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Michsior14 committed May 14, 2024
1 parent 2a095de commit 05c8b5f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -24,7 +25,6 @@ jobs:

env:
IMAGE_NAME: ubuntu-occt-asi-cgal-eigen-node
OCCT_VERSION: 7.7.2

strategy:
matrix:
Expand Down Expand Up @@ -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:
Expand Down
29 changes: 20 additions & 9 deletions tools/ubuntu-occt-asi-cgal-eigen-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand All @@ -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"
Expand Down

0 comments on commit 05c8b5f

Please sign in to comment.