From 91ffea3f6f11c347ff23050972d09d2dca23f9bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 20 Aug 2025 19:52:58 +0200 Subject: [PATCH] [CI] Some improvements to GitHub Actions * Use `julia-actions/cache` in more places * make building the docs more colourful * run CI jobs only when necessary --- .github/workflows/CI.yml | 14 ++++++++++++++ .github/workflows/Documenter.yml | 13 ++++++++++++- .github/workflows/IntegrationTest.yml | 13 ++++++++++++- .github/workflows/Invalidations.yml | 6 ++++++ 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 456dcef..a417013 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,10 +1,24 @@ name: CI + on: pull_request: + paths: + - '.github/workflows/CI.yml' + - 'ext/**' + - 'src/**' + - 'test/**' + - 'Project.toml' push: branches: - master tags: '*' + paths: + - '.github/workflows/CI.yml' + - 'ext/**' + - 'src/**' + - 'test/**' + - 'Project.toml' + jobs: test: name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml index 6b6c6e7..9ac9aee 100644 --- a/.github/workflows/Documenter.yml +++ b/.github/workflows/Documenter.yml @@ -1,9 +1,20 @@ name: Documenter + on: push: branches: [master] tags: [v*] + paths: + - '.github/workflows/Documenter.yml' + - 'docs/**' + - 'src/**' + - 'Project.toml' pull_request: + paths: + - '.github/workflows/Documenter.yml' + - 'docs/**' + - 'src/**' + - 'Project.toml' concurrency: # Skip intermediate builds: always. @@ -34,6 +45,6 @@ jobs: Pkg.develop(PackageSpec(path=pwd())) Pkg.instantiate() - uses: julia-actions/julia-buildpkg@v1 - - run: julia --project=docs docs/make.jl + - run: julia --project=docs --color=yes docs/make.jl env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/IntegrationTest.yml b/.github/workflows/IntegrationTest.yml index 5c985ad..8ea7846 100644 --- a/.github/workflows/IntegrationTest.yml +++ b/.github/workflows/IntegrationTest.yml @@ -2,10 +2,20 @@ name: IntegrationTest on: pull_request: + paths: + - '.github/workflows/IntegrationTest.yml' + - 'ext/**' + - 'src/**' + - 'Project.toml' push: branches: - master tags: '*' + paths: + - '.github/workflows/IntegrationTest.yml' + - 'ext/**' + - 'src/**' + - 'Project.toml' jobs: test: @@ -25,6 +35,7 @@ jobs: with: version: ${{ matrix.julia-version }} arch: x64 + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - name: Clone Downstream uses: actions/checkout@v5 @@ -32,7 +43,7 @@ jobs: repository: ${{ matrix.package.user }}/${{ matrix.package.repo }} path: downstream - name: Load this and run the downstream tests - shell: julia --project=downstream {0} + shell: julia --color=yes --project=downstream {0} run: | using Pkg try diff --git a/.github/workflows/Invalidations.yml b/.github/workflows/Invalidations.yml index 950c414..e45b5ce 100644 --- a/.github/workflows/Invalidations.yml +++ b/.github/workflows/Invalidations.yml @@ -2,6 +2,11 @@ name: Invalidations on: pull_request: + paths: + - '.github/workflows/Invalidations.yml' + - 'ext/**' + - 'src/**' + - 'Project.toml' concurrency: # Skip intermediate builds: always. @@ -19,6 +24,7 @@ jobs: - uses: julia-actions/setup-julia@v2 with: version: '1' + - uses: julia-actions/cache@v2 - uses: actions/checkout@v5 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-invalidations@v1