Skip to content

Commit

Permalink
Merge branch 'main' into coverage-update
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa authored Nov 29, 2024
2 parents 463f008 + 6242831 commit e713651
Show file tree
Hide file tree
Showing 264 changed files with 6,660 additions and 2,187 deletions.
2 changes: 1 addition & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ CheckOptions:
- key: cppcoreguidelines-avoid-do-while.IgnoreMacros
value: "true"
- key: misc-include-cleaner.IgnoreHeaders
value: ".*/experiments.hpp;.*/fiction_experiments.hpp;.*/fmt/.*"
value: "cmake/try_z3.cpp;.*/experiments.hpp;.*/fiction_experiments.hpp;.*/fmt/.*"
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
Expand Down
92 changes: 52 additions & 40 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,69 +1,81 @@
# Prerequisites
*.d
**/*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj
**/*.slo
**/*.lo
**/*.o
**/*.obj

# Precompiled Headers
*.gch
*.pch
**/*.gch
**/*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll
**/*.so
**/*.dylib
**/*.dll

# Fortran module files
*.mod
*.smod
**/*.mod
**/*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib
**/*.lai
**/*.la
**/*.a
**/*.lib

# Executables
*.exe
*.out
*.app
**/*.exe
**/*.out
**/*.app

# LaTeX files
*.aux
*.log
*.pdf
*.synctex.gz
**/*.aux
**/*.log
**/*.pdf
**/*.synctex.gz

# Doxygen files
*.bak
**/*.bak

# Build directories
cmake-build-*
build/
**/*cmake-build-*
**/build/

# IDE files
*.directory
*.idea
*.vs
**/*.directory
**/*.idea
**/*.vs
**/*.vscode

# Experiment files
*.json
*.csv
**/*.json
**/*.csv
**/*.html
**/*.dot

# Documentation files
**/*.ans

# Coverage files
lcov.info
**/lcov.info

# Python
__pycache__
venv/
*.egg-info
*.env
**/__pycache__
**/venv/
**/dist/
**/*.ipynb_checkpoints/
**/*.ipynb
**/*.egg-info
**/*.env

# Archive files
*.zip
*.tar.*
*.7z
*.rar
**/*.zip
**/*.tar.*
**/*.7z
**/*.rar

# Git files
**/.git
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,17 @@ updates:
timezone: "Europe/Berlin"
assignees:
- "marcelwa"

- package-ecosystem: "docker"
directory: "/"
groups:
docker:
patterns:
- "*"
schedule:
interval: "weekly"
day: "friday"
time: "06:00"
timezone: "Europe/Berlin"
assignees:
- "marcelwa"
2 changes: 1 addition & 1 deletion .github/workflows/clang-tidy-review-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# Posts the comments
- name: Post review comments
id: post-review
uses: ZedThree/clang-tidy-review/post@v0.19.0
uses: ZedThree/clang-tidy-review/post@v0.20.1

# If there are any comments, fail the check
- if: steps.post-review.outputs.total_comments > 0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- '**/*.cpp'
- 'libs/**'
- '.github/workflows/clang-tidy-review.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -25,7 +25,7 @@ jobs:
submodules: recursive

- name: Review code with Clang-Tidy
uses: ZedThree/clang-tidy-review@v0.19.0
uses: ZedThree/clang-tidy-review@v0.20.1
id: review
with:
cmake_command: >
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- '**/*.py'
- 'libs/**'
- '.github/workflows/codeql-analysis.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
Expand All @@ -22,7 +22,7 @@ on:
- '**/*.py'
- 'libs/**'
- '.github/workflows/codeql-analysis.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:
schedule:
- cron: '30 5 * * 6'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/coverage.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
Expand All @@ -20,7 +20,7 @@ on:
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/coverage.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:

concurrency:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
lcov -l lcov_filtered.info
- name: Upload report to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ${{github.workspace}}/lcov_filtered.info
fail_ci_if_error: true
Expand Down
69 changes: 64 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- '.github/workflows/docker-image.yml'
- 'Dockerfile'
- '.dockerignore'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
Expand All @@ -24,22 +24,81 @@ on:
- '.github/workflows/docker-image.yml'
- 'Dockerfile'
- '.dockerignore'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:
workflow_dispatch:
release:
types: [ published ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
build:
name: 🐳 Build Docker image
name: 🐳 Build and publish Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build the Docker image
run: docker build --build-arg NUMBER_OF_JOBS=4 . --file Dockerfile --tag fiction:$(date +%s)
- name: Log in to Docker Hub
if: github.event_name == 'release' && github.event.action == 'published'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to GitHub Container Registry
if: github.event_name == 'release' && github.event.action == 'published'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
if: github.event_name == 'release' && github.event.action == 'published'
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ secrets.DOCKER_USERNAME }}/fiction
ghcr.io/${{ github.repository }}
tags: |
${{ github.event.release.tag_name || 'dev' }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: ${{ github.workspace }}
file: Dockerfile
push: ${{ github.event_name == 'release' && github.event.action == 'published' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels || '' }}

- name: Push README as DockerHub project description
if: github.event_name == 'release' && github.event.action == 'published'
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ secrets.DOCKER_USERNAME }}/fiction
short-description: ${{ steps.meta.outputs.labels.description || '' }}
readme-filepath: ${{ github.workspace }}/README.md

- name: Generate artifact attestation
if: github.event_name == 'release' && github.event.action == 'published'
uses: actions/attest-build-provenance@v1
with:
subject-name: docker.io/${{ secrets.DOCKER_USERNAME }}/fiction
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
5 changes: 3 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/macos.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
pull_request:
branches: [ 'main' ]
paths:
Expand All @@ -20,7 +20,7 @@ on:
- '**/CMakeLists.txt'
- 'libs/**'
- '.github/workflows/macos.yml'
- '!bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
- '!bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
merge_group:

concurrency:
Expand Down Expand Up @@ -80,6 +80,7 @@ jobs:
run: brew install tbb

- name: Setup XCode version
if: matrix.os == 'macos-13'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "^14.2"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pyfiction-docstring-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ jobs:
run: >
python3
-m pybind11_mkdoc
-o ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
-o ${{ github.workspace }}/bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
-D FICTION_Z3_SOLVER
`find ${{ github.workspace }}/include/fiction -name "*.hpp" -print`
- name: Upload docstrings as an artifact
uses: actions/upload-artifact@v4
with:
path: ${{ github.workspace }}/bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
path: ${{ github.workspace }}/bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
overwrite: true

- name: Commit docstrings
uses: EndBug/add-and-commit@v9
with:
add: 'bindings/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
add: 'bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp'
commit: '--signoff'
message: ':memo: Update pyfiction docstrings'
author_name: GitHub Actions
Expand Down
Loading

0 comments on commit e713651

Please sign in to comment.