From 495b2f231198e3ed81263674e7df00bb19f9e1d7 Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Mon, 29 Apr 2024 19:41:31 +0530 Subject: [PATCH 1/3] ci: update the format check workflow to use the centralised reusable workflow --- .github/workflows/FormatCheck.yml | 37 ++++--------------------------- 1 file changed, 4 insertions(+), 33 deletions(-) diff --git a/.github/workflows/FormatCheck.yml b/.github/workflows/FormatCheck.yml index 55af13c..c240796 100644 --- a/.github/workflows/FormatCheck.yml +++ b/.github/workflows/FormatCheck.yml @@ -1,42 +1,13 @@ -name: format-check +name: "Format Check" on: push: branches: - 'master' - - 'release-' tags: '*' 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`) |> read |> String - if out == "" - exit(0) - else - @error "Some files have not been formatted !!!" - write(stdout, out) - exit(1) - end' + format-check: + name: "Format Check" + uses: "SciML/.github/.github/workflows/format-check.yml@v1" From dc22fca34a9f84eccebcd73c9c72c1573eae968d Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Mon, 29 Apr 2024 20:14:55 +0530 Subject: [PATCH 2/3] ci: update the docs workflow to use the centralised reusable workflow --- .github/workflows/Documentation.yml | 46 +++++++++++------------------ 1 file changed, 18 insertions(+), 28 deletions(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 8a688af..030c5a4 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -1,28 +1,18 @@ -name: Documentation - -on: - push: - branches: - - master - tags: '*' - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@latest - with: - version: '1' - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key - run: julia --project=docs/ --code-coverage=user docs/make.jl - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 - with: - file: lcov.info +name: "Documentation" + +on: + push: + branches: + - master + tags: '*' + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }} + +jobs: + build-and-deploy-docs: + name: "Documentation" + uses: "SciML/.github/.github/workflows/documentation.yml@v1" + secrets: "inherit" From 46cc9ddc1a57f414928b09e6e955e38de7f79484 Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Thu, 2 May 2024 21:08:15 +0530 Subject: [PATCH 3/3] ci: update tests workflow to use centralised reusable workflow --- .github/workflows/Tests.yml | 20 ++++++++++++++++++++ .github/workflows/ci.yml | 37 ------------------------------------- 2 files changed, 20 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/Tests.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml new file mode 100644 index 0000000..2b50c84 --- /dev/null +++ b/.github/workflows/Tests.yml @@ -0,0 +1,20 @@ +name: "Tests" +on: + pull_request: + branches: + - master + push: + branches: + - master +jobs: + tests: + name: "Tests" + strategy: + matrix: + group: + - "Core" + - "Downstream" + uses: "SciML/.github/.github/workflows/tests.yml@v1" + with: + group: "${{ matrix.group }}" + secrets: "inherit" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 309ea18..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: CI -on: - pull_request: - branches: - - master - push: - branches: - - master -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - group: - - Core - - Downstream - version: - - '1' - steps: - - uses: actions/checkout@v4 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - - uses: actions/cache@v4 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - env: - GROUP: ${{ matrix.group }}