Skip to content

CI

CI #1600

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags: '*'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
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 }}
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
timeout-minutes: 50
strategy:
fail-fast: false
matrix:
version:
- '1.12'
- '1.13'
os:
- ubuntu-latest
arch:
- x64
include:
# Merges into the ubuntu/1.12 combination rather than adding a job.
- os: ubuntu-latest
version: '1.12'
coverage: true
- os: windows-latest
arch: x64
version: '1.12'
- os: macOS-latest
arch: aarch64
version: '1.12'
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Install display dependencies for GLMakie
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgl1-mesa-dri
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
BUILD_IS_PRODUCTION_BUILD: true
# Only Linux gets a virtual display, so runtests.jl skips the plotting tests
# elsewhere. Julia 1.12.7 precompiles the whole test environment up front,
# which loads GLMakie before that guard runs; keep it lazy off Linux.
JULIA_PKG_PRECOMPILE_AUTO: ${{ runner.os == 'Linux' && '1' || '0' }}
with:
coverage: ${{ matrix.coverage || false }}
prefix: ${{ runner.os == 'Linux' && 'xvfb-run -a' || '' }}
- uses: julia-actions/julia-processcoverage@v1
if: matrix.coverage
- uses: codecov/codecov-action@v7
if: matrix.coverage
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
continue-on-error: true
docs:
name: Documentation
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v7
- uses: julia-actions/setup-julia@v3
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Start virtual display for GLMakie
run: |
sudo apt-get update
sudo apt-get install -y xvfb libgl1-mesa-dri
Xvfb :99 -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> "$GITHUB_ENV"
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}