Skip to content

Commit

Permalink
Merge pull request #7 from equinor/subsheat3D/test_from_grids
Browse files Browse the repository at this point in the history
Subsheat3 d/test from grids
  • Loading branch information
adamchengtkc authored Nov 20, 2023
2 parents 714432f + 6ddda70 commit 5fc3434
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 22 deletions.
30 changes: 8 additions & 22 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM dolfinx/dolfinx:v0.6.0
# FROM mcr.microsoft.com/devcontainers/base:jammy

LABEL org.opencontainers.image.source https://github.com/equinor/warmth
ARG DEBIAN_FRONTEND=noninteractive
# RUN useradd -ms /bin/bash vscode
# ARG USER=vscode

RUN DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
Expand All @@ -25,22 +24,9 @@ RUN DEBIAN_FRONTEND=noninteractive \
libffi-dev \
liblzma-dev

# # Python and poetry installation
# # USER $USER
# # ARG HOME="/home/$USER"

# # Don't change. Dolfinx in the base image is only compiled with 3.10
# #ARG PYTHON_VERSION=3.10.6

# # Use poetry pyenv
# #ENV PYENV_ROOT="${HOME}/.pyenv"
# #ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${HOME}/.local/bin:/root/.local/bin:$PATH"
ENV PATH="/root/.local/bin:$PATH"
RUN echo "done 0" \
# # && curl https://pyenv.run | bash \
# # && echo "done 1" \
# # && pyenv install ${PYTHON_VERSION} \
# # && echo "done 2" \
# # && pyenv global ${PYTHON_VERSION} \
# # && echo "done 3" \
&& curl -sSL https://install.python-poetry.org | python3 -
RUN useradd -rm -d /home/vscode -s /bin/bash -g root -G sudo -u 1000 vscode -p ""
USER 1000
WORKDIR /home/vscode
ENV HOME=/home/vscode
ENV PATH="/root/.local/bin:$HOME/.local/bin::$PATH"
RUN curl -sSL https://install.python-poetry.org | python3 -
42 changes: 42 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build docker

on:
push:
branches: [ "main" ]
paths:
- '.devcontainer/Dockerfile'
workflow_dispatch:
permissions:
id-token: write
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
with:
driver-opts: |
image=moby/buildkit:v0.11.2
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64
tags: ghcr.io/equinor/warmth:latest
1 change: 1 addition & 0 deletions .github/workflows/python-test-3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
args: |
bash -c "cd /home/warmth" && pip install . pytest==7.4.2 pytest-cov==4.1.0 && pytest --cov-report=term-missing --cov=warmth tests | tee pytest-coverage.txt
- name: Comment coverage
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }}
uses: coroo/[email protected]
Expand Down

0 comments on commit 5fc3434

Please sign in to comment.