Skip to content

Commit

Permalink
Some improvements to CI setup
Browse files Browse the repository at this point in the history
* Install dependabot
* Define concurrency groups
* Run only on minimum support version, latest stable and nightly
* Don't run CI on impossible combinations of architectures
* Fix codecov setup
* Simplify documentation job
  • Loading branch information
giordano committed Feb 19, 2025
1 parent 37b3e0d commit 7850b34
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 36 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
58 changes: 22 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI

on:
pull_request:
branches:
Expand All @@ -7,6 +8,13 @@ on:
branches:
- master
tags: '*'

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: on PRs.
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 }}
Expand All @@ -16,60 +24,38 @@ jobs:
matrix:
version:
- '1.6'
- '1.7'
- '1.9'
- '1.10'
- '1' # automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include:
- macos-13
- macos-latest
exclude:
- os: macos-latest
version: '1'
arch: aarch64
- os: ubuntu-latest
version: 'nightly'
arch: aarch64
allow_failure: true
version: '1.6'
steps:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v3
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/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
# - uses: julia-actions/julia-processcoverage@v1
# - uses: codecov/codecov-action@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
files: lcov.info

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
Pkg.build()'
- run: julia --project=docs docs/make.jl
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}

0 comments on commit 7850b34

Please sign in to comment.