Skip to content

CI: Cancel outdated PR builds when new commits are pushed to a PR bra… #65

CI: Cancel outdated PR builds when new commits are pushed to a PR bra…

CI: Cancel outdated PR builds when new commits are pushed to a PR bra… #65

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags: '*'
pull_request:
concurrency:
# Skip intermediate builds: all builds except for builds on the `master` branch
# Cancel intermediate builds: only pull request builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.6' # Previous LTS
- '1.7'
- '1.8'
- '1.9'
- '1.10' # Current LTS
- '1.11'
- '1' # Automatically expands to the latest stable 1.x release of Julia
- 'nightly'
os:
- ubuntu-latest
arch:
# Important note: the value of `arch` only affects the architecture of the Julia binary.
# It does not affect the CPU architecture of the GitHub runner (the GitHub virtual machine that runs the job).
# GitHub runners are always 64-bit virtual machines.
- x64
- x86
include:
# test macOS and Windows with latest Julia only
- os: macOS-latest
arch: x64
version: '1'
- os: windows-latest
arch: x64
version: '1'
- os: windows-latest
arch: x86
version: '1'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- 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
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}