Skip to content

Commit

Permalink
Dedicated Dockerfile for buiding Doxygen documentation (#599)
Browse files Browse the repository at this point in the history
  • Loading branch information
volkm authored Aug 27, 2024
1 parent d4bf482 commit f6b1d20
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 23 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/Dockerfile.doxygen
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Dockerfile for Storm's Doxygen documentation
##############################################
# The Docker image can be built by executing:
# docker build -t yourusername/storm .

# Set base image
FROM movesrwth/storm-dependencies:latest
MAINTAINER Matthias Volk <[email protected]>

# Specify configurations
# These configurations can be set from the commandline with:
# --build-arg <config_name>=<value>
# Specify number of threads to use for parallel compilation
ARG no_threads=1


# Install dependencies
######################
RUN apt-get update && apt-get upgrade -qqy && apt-get install -qq -y \
doxygen \
graphviz

# Build Doxygen documentation
#############################
RUN mkdir /opt/storm
WORKDIR /opt/storm

# Copy the content of the current local Storm repository into the Docker image
COPY . .

# Switch to build directory
RUN mkdir -p /opt/storm/build
WORKDIR /opt/storm/build

# Configure Storm
RUN cmake .. -DCMAKE_BUILD_TYPE=Release \
-DSTORM_PORTABLE=ON \
-DSTORM_USE_GUROBI=ON \
-DSTORM_USE_SOPLEX=ON \
-DSTORM_USE_SPOT_SYSTEM=ON

# Build Doxygen
RUN make doc -j $no_threads
31 changes: 8 additions & 23 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Doxygen
# Builds and deploys storms doxygen documentation
# Builds and deploys Storm's Doxygen documentation

on:
schedule:
Expand All @@ -9,9 +9,6 @@ on:
workflow_dispatch:

env:
BASE_IMG: "movesrwth/carl-storm:ci-release"
STORM_GIT_URL: "${{ github.server_url }}/${{ github.repository }}.git"
STORM_BRANCH: "master"
# GitHub runners currently have 4 cores
NR_JOBS: "4"

Expand All @@ -24,26 +21,14 @@ jobs:
# Do not run on forks
if: github.repository_owner == 'moves-rwth'
steps:
- name: Init Docker
run: sudo docker run -d -it --name storm ${BASE_IMG}

# We should not do partial updates :/
# but we need to install some dependencies
# Surely we can find a better way to do this at some point
- name: Update base system
run: |
sudo docker exec storm apt-get update
sudo docker exec storm apt-get upgrade -qqy
- name: install dependencies
run: sudo docker exec storm apt-get install -qq -y doxygen graphviz
- name: Git clone storm
run: sudo docker exec storm git clone --depth 1 --branch $STORM_BRANCH $STORM_GIT_URL /opt/storm
- name: Run cmake
run: sudo docker exec storm bash -c "mkdir /opt/storm/build; cd /opt/storm/build; cmake .."
- name: Build doxygen
run: sudo docker exec storm bash -c "cd /opt/storm/build; make doc -j ${NR_JOBS}"
- name: Git clone
uses: actions/checkout@v4
- name: Build Doxygen via Dockerfile
run: docker build -t movesrwth/storm-doc:latest -f .github/workflows/Dockerfile.doxygen . --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/storm-doc:latest
- name: Copy doxygen
run: sudo docker cp storm:/opt/storm/build/doc/html .
run: docker cp ci:/opt/storm/build/doc/html .
- name: Deploy doxygen
uses: peaceiris/actions-gh-pages@v4
with:
Expand Down

0 comments on commit f6b1d20

Please sign in to comment.