-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dokken/update-3D-1D
- Loading branch information
Showing
242 changed files
with
17,260 additions
and
14,031 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ on: | |
default: "main" | ||
type: string | ||
test_pypi_publish: | ||
description: "Publish to Test PyPi (true | false)" | ||
description: "Publish to Test PyPi" | ||
default: false | ||
type: boolean | ||
pypi_publish: | ||
description: "Publish to PyPi (true | false)" | ||
description: "Publish to PyPi" | ||
default: false | ||
type: boolean | ||
|
||
|
@@ -26,11 +26,11 @@ on: | |
default: "main" | ||
type: string | ||
test_pypi_publish: | ||
description: "Publish to Test PyPi (true | false)" | ||
description: "Publish to Test PyPi" | ||
default: false | ||
type: boolean | ||
pypi_publish: | ||
description: "Publish to PyPi (true | false))" | ||
description: "Publish to PyPi" | ||
default: false | ||
type: boolean | ||
|
||
|
@@ -40,7 +40,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout UFL | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.ufl_ref }} | ||
|
||
|
@@ -50,32 +50,48 @@ jobs: | |
- name: Build sdist and wheel | ||
run: python -m build . | ||
|
||
- uses: actions/upload-artifact@v2 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
path: dist/* | ||
|
||
upload_test_pypi: | ||
name: Upload to test PyPI (optional) | ||
if: ${{ github.event.inputs.test_pypi_publish == 'true' }} | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/fenics-ufl | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Push to test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
upload_pypi: | ||
name: Upload to PyPI (optional) | ||
if: ${{ github.event.inputs.pypi_publish == 'true' }} | ||
needs: [build] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/fenics-ufl | ||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- uses: actions/download-artifact@v2 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: artifact | ||
path: dist | ||
|
||
- name: Push to PyPI | ||
uses: pypa/[email protected] | ||
if: ${{ github.event.inputs.pypi_publish == 'true' }} | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
repository_url: https://upload.pypi.org/legacy/ | ||
|
||
- name: Push to Test PyPI | ||
uses: pypa/[email protected] | ||
if: ${{ github.event.inputs.test_pypi_publish == 'true' }} | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TEST_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
branches: | ||
- "**" | ||
tags: | ||
- "v*" | ||
- "**" | ||
pull_request: | ||
branches: | ||
- main | ||
|
@@ -20,66 +20,72 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
exclude: | ||
- os: macos-latest | ||
python-version: '3.8' | ||
- os: macos-latest | ||
python-version: '3.9' | ||
include: | ||
- os: windows-latest | ||
python-version: '3.11' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Lint with flake8 | ||
run: | | ||
python -m pip install flake8 | ||
flake8 --statistics . | ||
- name: Check documentation style | ||
- name: Lint with ruff | ||
run: | | ||
python -m pip install pydocstyle | ||
python -m pydocstyle . | ||
pip install ruff | ||
ruff check . | ||
ruff format --check . | ||
- name: Install UFL | ||
run: python -m pip install .[ci] | ||
- name: Run unit tests | ||
run: | | ||
python -m pytest -n auto --cov=ufl/ --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml test/ | ||
- name: Upload to Coveralls | ||
if: ${{ github.repository == 'FEniCS/ufl' && github.head_ref == '' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' }} | ||
if: ${{ github.repository == 'FEniCS/ufl' && github.head_ref == '' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: coveralls | ||
|
||
- name: Build documentation | ||
run: | | ||
cd doc/sphinx | ||
make html | ||
- name: Upload documentation artifact | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: doc-${{ matrix.os }}-${{ matrix.python-version }} | ||
path: doc/sphinx/build/html/ | ||
retention-days: 2 | ||
if-no-files-found: error | ||
|
||
- name: Checkout FEniCS/docs | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }} | ||
uses: actions/checkout@v2 | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.12 }} | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: "FEniCS/docs" | ||
path: "docs" | ||
ssh-key: "${{ secrets.SSH_GITHUB_DOCS_PRIVATE_KEY }}" | ||
- name: Set version name | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }} | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.12 }} | ||
run: | | ||
echo "VERSION_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: Copy documentation into repository | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }} | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.12 }} | ||
run: | | ||
cd docs | ||
git rm -r --ignore-unmatch ufl/${{ env.VERSION_NAME }} | ||
mkdir -p ufl/${{ env.VERSION_NAME }} | ||
cp -r ../doc/sphinx/build/html/* ufl/${{ env.VERSION_NAME }} | ||
- name: Commit and push documentation to FEniCS/docs | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.8 }} | ||
if: ${{ github.repository == 'FEniCS/ufl' && ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') ) && runner.os == 'Linux' && matrix.python-version == 3.12 }} | ||
run: | | ||
cd docs | ||
git config --global user.email "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Spack build | ||
|
||
on: | ||
# Uncomment the below 'push' to trigger on push | ||
# push: | ||
# branches: | ||
# - "**" | ||
schedule: | ||
# '*' is a special character in YAML, so string must be quoted | ||
- cron: "0 2 * * WED" | ||
workflow_dispatch: | ||
inputs: | ||
spack_repo: | ||
description: "Spack repository to test" | ||
default: "spack/spack" | ||
type: string | ||
spack_ref: | ||
description: "Spack repository branch/tag to test" | ||
default: "develop" | ||
type: string | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: ubuntu:latest | ||
steps: | ||
- name: Install Spack requirements | ||
run: | | ||
apt-get -y update | ||
apt-get install -y bzip2 curl file git gzip make patch python3-minimal tar xz-utils | ||
apt-get install -y g++ gfortran # compilers | ||
- name: Get Spack | ||
if: github.event_name != 'workflow_dispatch' | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./spack | ||
repository: spack/spack | ||
- name: Get Spack | ||
if: github.event_name == 'workflow_dispatch' | ||
uses: actions/checkout@v4 | ||
with: | ||
path: ./spack | ||
repository: ${{ github.event.inputs.spack_repo }} | ||
ref: ${{ github.event.inputs.spack_ref }} | ||
|
||
- name: Install UFL development version and run tests | ||
run: | | ||
. ./spack/share/spack/setup-env.sh | ||
spack env create main | ||
spack env activate main | ||
spack add py-fenics-ufl@main | ||
spack install --test=root | ||
- name: Install UFL release version and run tests | ||
run: | | ||
. ./spack/share/spack/setup-env.sh | ||
spack env create release | ||
spack env activate release | ||
spack add py-fenics-ufl | ||
spack install --test=root |
Oops, something went wrong.