Skip to content

Commit 36de714

Browse files
authored
Check docker image build on CI (#116)
* Make post release fix * Update build instructions
1 parent b780366 commit 36de714

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
on:
22
push:
3-
branches:
4-
- "!*"
53
tags:
64
- "v*"
5+
pull_request:
6+
branches:
7+
- release
8+
- main
79

810
workflow_dispatch:
911

@@ -43,6 +45,18 @@ jobs:
4345

4446
- name: Build and push Docker image
4547
uses: docker/build-push-action@v5
48+
with:
49+
context: .
50+
load: true
51+
push: false
52+
file: docker/Dockerfile
53+
platforms: linux/amd64
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}
56+
57+
- name: Build and push Docker image
58+
uses: docker/build-push-action@v5
59+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4660
with:
4761
context: .
4862
push: true

.github/workflows/sonarcloud.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,11 @@ jobs:
6767
uses: jorgensd/actions/[email protected]
6868
with:
6969
petsc_arch: ${PETSC_ARCH}
70-
dolfinx: main
71-
70+
dolfinx: v0.8.0
71+
basix: v0.8.0
72+
ufl: 2024.1.0.post0
73+
ffcx: v0.8.0
74+
7275
- name: Run build-wrapper
7376
run: |
7477
cmake -S ./cpp -B build-mpc

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Main
4+
5+
- No changes
6+
37
## v0.8.0
48

59
- **API**

docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ RUN python3 -m pip install meshio
1515

1616
# Copy DOLFINX_MPC source dir
1717
COPY . dolfinx_mpc
18+
RUN python3 -m pip install -U pip setuptools
1819

1920
# Install real mode
2021
RUN . /usr/local/bin/dolfinx-real-mode && \
2122
. /usr/local/dolfinx-real/lib/dolfinx/dolfinx.conf && \
2223
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-real -DCMAKE_BUILD_TYPE=Developer -B build-dir-real dolfinx_mpc/cpp/ && \
2324
ninja install -j4 -C build-dir-real && \
24-
python3 -m pip install -v --target /usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir dolfinx_mpc/python
25+
python3 -m pip install -v --no-build-isolation --check-build-dependencies \
26+
--target /usr/local/dolfinx-real/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir ./dolfinx_mpc/python
2527

2628
# Clean repo to remove build dir from pip
2729
RUN rm -rf dolfinx_mpc/python/build
@@ -31,6 +33,7 @@ RUN . /usr/local/bin/dolfinx-complex-mode && \
3133
. /usr/local/dolfinx-complex/lib/dolfinx/dolfinx.conf && \
3234
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local/dolfinx-complex -DCMAKE_BUILD_TYPE=Developer -B build-dir-complex dolfinx_mpc/cpp/ && \
3335
ninja install -j4 -C build-dir-complex && \
34-
python3 -m pip install -v --target /usr/local/dolfinx-complex/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir dolfinx_mpc/python
36+
python3 -m pip install -v --no-build-isolation --check-build-dependencies \
37+
--target /usr/local/dolfinx-complex/lib/python${PYTHON_VERSION}/dist-packages --no-dependencies --no-cache-dir ./dolfinx_mpc/python
3538

3639
WORKDIR /root

0 commit comments

Comments
 (0)