Skip to content

Commit

Permalink
Merge branch 'develop' into cython-dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
IshaanDesai committed Feb 5, 2024
2 parents b814305 + 49c2af0 commit e101088
Show file tree
Hide file tree
Showing 25 changed files with 2,165 additions and 2,012 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ jobs:
name: Run setup.py phases needed by spack
needs: [setup_test]
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -34,7 +36,9 @@ jobs:
setup_install:
name: Run setup install
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -59,7 +63,9 @@ jobs:
name: Run setup install --single-version-externally-managed (for spack)
needs: [setup_install]
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -96,12 +102,12 @@ jobs:
run: |
git clone --branch develop https://github.com/precice/precice.git precice-core
mkdir -p precice
cp precice-core/src/precice/SolverInterface.hpp precice/SolverInterface.hpp
cp precice-core/src/precice/Participant.hpp precice/Participant.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.cpp
cd precice-core
mkdir build && cd build
cmake .. -DPRECICE_MPICommunication=OFF -DPRECICE_PETScMapping=OFF -DPRECICE_PythonActions=OFF -DBUILD_TESTING=OFF
cmake .. -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DBUILD_TESTING=OFF
- name: Install dependencies
run: |
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
Expand All @@ -117,7 +123,9 @@ jobs:
name: Run pip install
needs: [setup_test]
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -138,7 +146,9 @@ jobs:
name: Run solverdummy
needs: [setup_install, setup_test]
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand Down
39 changes: 32 additions & 7 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
name: Update docker image

on:
workflow_dispatch: # Trigger by hand from the UI
workflow_dispatch: # Trigger by hand from the UI
inputs:
branch:
type: choice
description: branch to build the image from
options:
- develop
- master
push:
branches:
- develop
- master


jobs:
build-and-release-docker-image:
Expand All @@ -13,10 +22,26 @@ jobs:
env:
docker_username: precice
steps:
- name: Get branch name
if: github.event_name != 'pull_request'
- name: Set branch name for manual triggering
if: github.event_name == 'workflow_dispatch'
shell: bash
run: echo "BINDINGS_REF=${{ inputs.branch }}" >> $GITHUB_ENV
- name: Set branch name for "on pull request" triggering
if: github.event_name != 'pull_request' && github.event_name != 'workflow_dispatch'
shell: bash
run: echo "BINDINGS_REF=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Set PRECICE_TAG and the TAG depending on branch
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" >> $GITHUB_ENV
run: |
if [[ '${{ env.BINDINGS_REF }}' == 'master' ]]; then
echo "PRECICE_TAG=latest" >> "$GITHUB_ENV"
echo "TAG=latest" >> "$GITHUB_ENV"
echo "Building TAG: latest"
else
echo "PRECICE_TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
echo "TAG=${{ env.BINDINGS_REF }}" >> "$GITHUB_ENV"
echo "Building TAG: ${{ env.BINDINGS_REF }}"
fi
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
Expand All @@ -31,7 +56,7 @@ jobs:
with:
push: true
file: "./tools/releasing/packaging/docker/Dockerfile"
tags: ${{ env.docker_username }}/python-bindings:${{ env.branch }},${{ env.docker_username }}/python-bindings:latest
tags: ${{ env.docker_username }}/python-bindings:${{ env.TAG }}
build-args: |
branch=${{ env.branch }}
from=precice/precice:develop
PRECICE_TAG=${{ env.PRECICE_TAG }}
PYTHON_BINDINGS_REF=${{ env.BINDINGS_REF }}
14 changes: 14 additions & 0 deletions .github/workflows/check-markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint docs
on: [push, pull_request]
jobs:
check_md:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Lint markdown files (markdownlint)
uses: articulate/actions-markdownlint@v1
with:
config: .markdownlint.json
files: '.'
ignore: changelog-entries
6 changes: 4 additions & 2 deletions .github/workflows/run-solverdummy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ jobs:
run_solverdummies:
name: Run solverdummies
runs-on: ubuntu-latest
container: precice/precice:develop
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand All @@ -23,7 +25,7 @@ jobs:
- name: Install bindings
run: pip3 install --user .
- name: Check whether preCICE was built with MPI # reformat version information as a dict and check whether preCICE was compiled with MPI
run: python3 -c "import precice; assert({item.split('=')[0]:item.split('=')[-1] for item in str(precice.get_version_information()).split(';')}['PRECICE_MPICommunication']=='Y')"
run: python3 -c "import precice; assert({item.split('=')[0]:item.split('=')[-1] for item in str(precice.get_version_information()).split(';')}['PRECICE_FEATURE_MPI_COMMUNICATION']=='Y')"
- name: Run solverdummies
run: |
cd examples/solverdummy/
Expand Down
7 changes: 7 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"MD013": false,
"MD014": false,
"MD024": false,
"MD034": false,
"MD033": false
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.

## latest

* Update CMake configuration flags for preCICE source installation in Actions. https://github.com/precice/python-bindings/commit/23a840144c2647d6cf09c0ed87be3b768a22feb7
* Remove API functions `has_mesh` and `has_data` and rename `get_mesh_vertices_and_ids` to `get_mesh_vertices_and_coordinates`. https://github.com/precice/python-bindings/commit/cd446d2807b841d81a4cf5c9dd6656ab43c278c3

## 2.5.0.4

* Add `tag_prefix = v` in versioneer configuration of `setup.cfg`.

## 2.5.0.3

* Update from versioneer 0.19 to 0.29.
* Add `cimport numpy` to avoid a segmentation fault originating from using Cython v3.0.0. https://github.com/precice/python-bindings/issues/182

## 2.5.0.2

* Add Waveform API introduced in preCICE v2.4.0.
Expand Down
Loading

0 comments on commit e101088

Please sign in to comment.