From a3eaa9aa5ad8ff0aa5effc620d203067fdd750e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Wed, 19 Feb 2025 18:26:42 +0000 Subject: [PATCH] Some improvements to CI setup * 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 --- .github/dependabot.yml | 7 +++++ .github/workflows/ci.yml | 58 +++++++++++++++------------------------- 2 files changed, 29 insertions(+), 36 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..700707c --- /dev/null +++ b/.github/dependabot.yml @@ -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" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 578b996..80c3aa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI + on: pull_request: branches: @@ -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 }} @@ -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 }}