From 15f28cad48a53b42a49f7bd6ef3e1719ad72e00d Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Mon, 29 Apr 2024 19:41:00 +0530 Subject: [PATCH 1/4] ci: update format check workflow to use 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 5ca22a4..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' \ No newline at end of file + format-check: + name: "Format Check" + uses: "SciML/.github/.github/workflows/format-check.yml@v1" From e532b6f6c5573cd643d64f15da87cc7f5ec6a1de Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Thu, 2 May 2024 21:54:06 +0530 Subject: [PATCH 2/4] ci: update tests workflow to use centralised reusable workflow --- .github/workflows/CI.yml | 41 ------------------------------------- .github/workflows/Tests.yml | 21 +++++++++++++++++++ 2 files changed, 21 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/CI.yml create mode 100644 .github/workflows/Tests.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml deleted file mode 100644 index 5a19f85..0000000 --- a/.github/workflows/CI.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CI -on: - push: - branches: - - main - tags: ['*'] - pull_request: - workflow_dispatch: -concurrency: - # Skip intermediate builds: always. - # Cancel intermediate builds: only if it is a pull request build. - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} -jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - '1' - os: - - ubuntu-latest - arch: - - x64 - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: julia-actions/cache@v1 - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - with: - files: lcov.info diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml new file mode 100644 index 0000000..b3a77a4 --- /dev/null +++ b/.github/workflows/Tests.yml @@ -0,0 +1,21 @@ +name: "Tests" + +on: + push: + branches: + - main + tags: ['*'] + pull_request: + workflow_dispatch: + +concurrency: + # Skip intermediate builds: always. + # Cancel intermediate builds: only if it is a pull request build. + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }} + +jobs: + tests: + name: "Tests" + uses: "SciML/.github/.github/workflows/tests.yml@v1" + secrets: "inherit" From 575be96b38c26309da0d067acb9bbe1b74da265d Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Tue, 7 May 2024 12:13:56 +0530 Subject: [PATCH 3/4] test Signed-off-by: Anant Thazhemadam --- .github/workflows/Tests.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index b3a77a4..c7aee85 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -19,3 +19,31 @@ jobs: name: "Tests" uses: "SciML/.github/.github/workflows/tests.yml@v1" secrets: "inherit" + + test: + name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + version: + - '1' + os: + - ubuntu-latest + arch: + - x64 + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.version }} + arch: ${{ matrix.arch }} + - uses: julia-actions/cache@v1 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + with: + files: lcov.info From 38ad297180b3e6a23b1749e7353bd24e344cdb0b Mon Sep 17 00:00:00 2001 From: Anant Thazhemadam Date: Tue, 7 May 2024 12:25:15 +0530 Subject: [PATCH 4/4] parity? Signed-off-by: Anant Thazhemadam --- .github/workflows/Tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index c7aee85..73d773a 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -18,6 +18,10 @@ jobs: tests: name: "Tests" uses: "SciML/.github/.github/workflows/tests.yml@v1" + with: + julia-arch: "x64" + julia-version: "1" + os: "ubuntu-latest" secrets: "inherit" test: