Skip to content

Commit

Permalink
Use benjaminrodenberg/fenics for CI stage "Build and Test" (#174)
Browse files Browse the repository at this point in the history
* Add dockerfile used for `benjaminrodenberg/fenics`
* Use `pip install --break-system-packages ...`.
  • Loading branch information
BenjaminRodenberg authored Aug 5, 2024
1 parent f3abeb0 commit 6350747
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip3 install --break-system-packages setuptools wheel twine
- name: Build distribution
run: python3 setup.py sdist
test:
name: Run mock unit tests
runs-on: ubuntu-latest
container: quay.io/fenicsproject/stable:current
container: benjaminrodenberg/fenics
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -37,7 +37,7 @@ jobs:
mkdir -p precice
echo "from setuptools import setup" >> precice/setup.py
echo "setup(name='pyprecice', version='3.0.0.0')" >> precice/setup.py
python3 -m pip install ./precice/
pip3 install --break-system-packages ./precice/
- name: Run unit tests
run: python3 setup.py test -s tests.unit
- name: Run integration tests
Expand Down
14 changes: 14 additions & 0 deletions tools/testing/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Dockerfile to build a ubuntu image containing the installed Debian package of a release
FROM ubuntu:24.04

# Add the precice user to run test with mpi
RUN useradd -m -s /bin/bash precice
ENV PRECICE_USER=precice

# Installing necessary dependencies
RUN apt-get -qq update && \
apt-get -qq install software-properties-common && \
add-apt-repository -y ppa:fenics-packages/fenics && \
apt-get -qq update && \
apt-get -qq install --no-install-recommends fenics python3-pip && \
rm -rf /var/lib/apt/lists/*

0 comments on commit 6350747

Please sign in to comment.