CI #1245
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Run on master, tags, or any pull request | |
on: | |
pull_request: | |
branches: "*" | |
push: | |
branches: master | |
tags: "*" | |
schedule: | |
- cron: "0 2 * * *" # Daily at 2 AM UTC (8 PM CST) | |
# Skip/cancel execution of queued/running jobs from outdated commits. Jobs run on the | |
# `master` branch are not subject to these restrictions and are always executed. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.version == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.6" # LTS / Oldest supported version | |
- "1" # Latest release | |
- nightly | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
arch: | |
- x64 | |
- x86 | |
exclude: | |
# Test 32-bit only on Linux | |
- os: macOS-latest | |
arch: x86 | |
- os: windows-latest | |
arch: x86 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v1 | |
# Only download the tzdata version used in TimeZones.jl's tests to avoid unnecessary | |
# load on IANA's servers. However, if the DEFAULT_TZDATA_VERSION constant was | |
# changed we need to also build the version specified by the constant to ensure it can be | |
# compiled. | |
# Note: The `git diff` command has a `--quiet` flag that will suppress output but doesn't | |
# catch all changes. | |
# | |
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable | |
- run: | | |
git fetch origin +:refs/remotes/origin/HEAD | |
if git diff --exit-code -G"^const DEFAULT_TZDATA_VERSION" origin/HEAD..HEAD > /dev/null; then | |
echo "JULIA_TZ_VERSION=$TZDATA_VERSION" >> $GITHUB_ENV | |
fi | |
shell: bash | |
env: | |
TZDATA_VERSION: 2016j # Matches tzdata version used in tests | |
- uses: julia-actions/julia-buildpkg@latest | |
- uses: julia-actions/julia-runtest@latest | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v2 | |
with: | |
files: lcov.info | |
benchmarks: | |
name: Benchmarks | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1" | |
- uses: julia-actions/julia-buildpkg@latest | |
- run: | | |
git fetch origin +:refs/remotes/origin/HEAD | |
julia --project=benchmark/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))' | |
julia --project=benchmark/ -e 'using PkgBenchmark, TimeZones; export_markdown(stdout, judge(TimeZones, "origin/HEAD", verbose=false))' | |
env: | |
TZDATA_VERSION: 2016j # Matches tzdata version used in tests | |
doctest: | |
name: Documentation - DocTests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1.9" | |
- uses: julia-actions/julia-buildpkg@latest | |
- shell: julia --color=yes --project=docs {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
- run: julia --project=docs docs/make.jl | |
env: | |
DOCTESTS: "true" | |
docs: | |
name: Documentation - Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: "1.9" | |
- uses: julia-actions/julia-buildpkg@latest | |
- shell: julia --color=yes --project=docs {0} | |
run: | | |
using Pkg | |
Pkg.instantiate() | |
- run: julia --project=docs docs/make.jl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} | |
DEPLOY_DOCS: "true" |