Skip to content

Move the build-mylib test into the regular test suite (and get rid of the separate build-mylib CI job) #486

Move the build-mylib test into the regular test suite (and get rid of the separate build-mylib CI job)

Move the build-mylib test into the regular test suite (and get rid of the separate build-mylib CI job) #486

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- 'master'
- 'release-*'
tags: '*'
merge_group: # GitHub Merge Queue
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:
finalize:
if: always() # this line is important to keep the `finalize` job from being marked as skipped; do not change or delete this line
runs-on: ubuntu-latest
timeout-minutes: 10
needs:
- ci_started
- test
- docs
steps:
- run: |
echo ci_started: ${{ needs.ci_started.result }}
echo test: ${{ needs.test.result }}
echo docs: ${{ needs.docs.result }}
- run: exit 1
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
ci_started:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- run: exit 0
test:
# We do not run the full test suite on tags, because we already ran it on master before we made the release.
# We do build the docs on tags.
if: (github.event_name != 'push') || (github.ref_type != 'tag')
timeout-minutes: 150
runs-on: ${{ matrix.github-runner }}
strategy:
max-parallel: 20 # leave space for other runs in the JuliaLang org, given these tests are long
fail-fast: false
matrix:
julia-version:
- '1.6' # previous LTS
- '1.10' # current LTS
- '1.11' # current stable
#
# 'pre' will install the latest prerelease build (RCs, betas, and alphas).
# Uncomment this line when there is an active prerelease available.
# Comment this line out when there is no prerelease available (to save CI time).
# - 'pre'
#
# Note: we have a separate workflow (.github/workflows/ci.nightly.yml)
# for Julia nightly.
julia-wordsize:
# The value here only affects the version of Julia binary that we download.
# It does not affect the architecture of the GitHub Runner (virtual machine) that
# we run on.
- '32' # 32-bit Julia. Only available on x86_64. Not available on aarch64.
- '64' # 64-bit Julia.
github-runner:
- ubuntu-latest
- windows-latest
- macos-13 # macos-13 = Intel.
- macos-14 # macos-14 = Apple Silicon.
coverage:
- 'true'
exclude:
# Julia 1.6 did not support Apple Silicon:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-version: '1.6'
#
# To save some CI time, on Julia 1.6 we only run the 64-bit job (and skip the 32-bit job).
- julia-version: '1.6'
julia-wordsize: '32'
#
# We don't have 32-bit builds of Julia for Intel macOS:
- github-runner: macos-13 # macos-13 = Intel.
julia-wordsize: '32'
#
# We don't have 32-bit builds of Julia for Apple Silicon macOS:
- github-runner: macos-14 # macos-14 = Apple Silicon.
julia-wordsize: '32'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
with:
version: ${{ matrix.julia-version }}
# If `julia-wordsize` is 32, then we set `arch` to `x86`, because we know that
# 32-bit builds of Julia are only available for x86.
#
# If `julia-wordsize` is 64, then we set `arch` to `${{ runner.arch }}`, which
# GitHub will automatically expand to the correct value (`x86_64` or `aarch64`)
# based on the architecture of the underlying GitHub Runner (virtual machine).
arch: ${{ github.ref == '32' && 'x86' || runner.arch }}
- uses: julia-actions/cache@824243901fb567ccb490b0d0e2483ccecde46834 # v2.0.5
- uses: julia-actions/julia-runtest@d0c4f093badade621cd041bba567d1e832480ac2 # v1.10.0
with:
coverage: ${{ matrix.coverage }}
- uses: julia-actions/julia-processcoverage@03114f09f119417c3242a9fb6e0b722676aedf38 # v1.2.2
- uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
file: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
docs:
# We do build the docs on tags.
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: julia-actions/setup-julia@9b79636afcfb07ab02c256cede01fe2db6ba808c # v2.6.0
with:
version: '1'
- name: Build and deploy docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
run: julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'