Skip to content

Commit

Permalink
Merge branch 'master' into kam/typos
Browse files Browse the repository at this point in the history
  • Loading branch information
KnutAM committed Aug 29, 2024
2 parents 908647a + b6976d3 commit f1eb7ec
Show file tree
Hide file tree
Showing 133 changed files with 10,052 additions and 5,731 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# `pre-commit run --all-files` (https://github.com/Ferrite-FEM/Ferrite.jl/pull/928)
68e1ab15bea4618f76b9ed1d850e2ce33375e266
57 changes: 57 additions & 0 deletions .github/workflows/Check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Code checks

on:
pull_request:
push:
branches: ["master"]

jobs:

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

explicit-imports:
runs-on: ubuntu-latest
name: "ExplicitImports.jl"
steps:
- uses: actions/checkout@v4
# - uses: julia-actions/setup-julia@v2
# with:
# version: '1'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Install dependencies
shell: julia {0}
run: |
# Add ExplicitImports.jl and packages that Ferrite has extensions for
using Pkg
Pkg.add([
PackageSpec(name = "ExplicitImports", version = "1.6"),
PackageSpec(name = "Metis"),
PackageSpec(name = "BlockArrays"),
])
- name: ExplicitImports.jl code checks
shell: julia --project {0}
run: |
using Ferrite, ExplicitImports, Metis, BlockArrays
# Check Ferrite
allow_unanalyzable = (ColoringAlgorithm,) # baremodules
check_no_implicit_imports(Ferrite; allow_unanalyzable)
check_no_stale_explicit_imports(Ferrite; allow_unanalyzable)
check_all_qualified_accesses_via_owners(Ferrite)
check_no_self_qualified_accesses(Ferrite)
# Check extension modules
for ext in (:FerriteBlockArrays, :FerriteMetis)
extmod = Base.get_extension(Ferrite, ext)
if extmod !== nothing
check_no_implicit_imports(extmod)
check_no_stale_explicit_imports(extmod)
check_all_qualified_accesses_via_owners(extmod)
check_no_self_qualified_accesses(extmod)
else
@warn "$(ext) extensions not available."
end
end
19 changes: 8 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
matrix:
julia-version: ['1.6', '1', 'nightly']
julia-version: ['1.9', '1', 'nightly']
os: ['ubuntu-latest']
include:
- os: windows-latest
Expand All @@ -23,33 +23,30 @@ jobs:
julia-version: '1'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
with:
directories: 'src,ext'
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
file: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: actions/cache@v3
with:
path: |
~/.julia/artifacts
~/.julia/packages
~/.julia/registries
key: .julia-docs-${{ hashFiles('docs/Project.toml', 'docs/Manifest.toml') }}
- uses: julia-actions/cache@v2
- name: Install dependencies
run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.precompile()'
- name: Build and deploy
Expand Down
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
Loading

0 comments on commit f1eb7ec

Please sign in to comment.