From fe10c22016cf854263fff9a500f51f2327311eb6 Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Wed, 13 Mar 2024 15:50:34 +0530 Subject: [PATCH] ci(format-check): use centralized, reusable SciML format check workflow Update the workflow to directly use the centralized, reusable format checking workflow defined for SciML repositories. --- .github/workflows/FormatCheck.yml | 36 ++++--------------------------- src/krylov_phiv_adaptive.jl | 3 ++- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index dd55150..35f435a 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -1,4 +1,4 @@ -name: format-check +name: "Format Check" on: push: @@ -9,34 +9,6 @@ on: pull_request: jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - julia-version: [1] - julia-arch: [x86] - os: [ubuntu-latest] - steps: - - uses: julia-actions/setup-julia@latest - with: - version: ${{ matrix.julia-version }} - - - uses: actions/checkout@v4 - - name: Install JuliaFormatter and format - # This will use the latest version by default but you can set the version like so: - # - # julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter", version="0.13.0"))' - run: | - julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))' - julia -e 'using JuliaFormatter; format(".", verbose=true)' - - name: Format check - run: | - julia -e ' - out = Cmd(`git diff --name-only`) |> read |> String - if out == "" - exit(0) - else - @error "Some files have not been formatted !!!" - write(stdout, out) - exit(1) - end' + format-check: + name: "Format Checks" + uses: "SciML/.github/.github/workflows/format-suggestions-on-pr.yml@014c98428fa1165dbf01478156359253f984fb0a" diff --git a/src/krylov_phiv_adaptive.jl b/src/krylov_phiv_adaptive.jl index 6b2ae6f..a981472 100644 --- a/src/krylov_phiv_adaptive.jl +++ b/src/krylov_phiv_adaptive.jl @@ -30,7 +30,8 @@ intuitive interface (vector `b` instead of a n-by-1 matrix `B`). evaluating the φ-functions in exponential integrators. arXiv preprint arXiv:0907.4631. """ -function expv_timestep(ts::Vector{tType}, A, b; kwargs...) where {tType <: Real} +function expv_timestep(ts::Vector{tType}, +A, b; kwargs...) where {tType <: Real} U = similar(b, size(A, 1), length(ts)) expv_timestep!(U, ts, A, b; kwargs...) end