Try to make CI faster #165
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 | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
env: | |
JULIA_NUM_THREADS: 2 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- "1.6" # LTS | |
- "1" # Latest | |
- "~1.9.0-0" # To test heap snapshot; remove when v1.9 is latest Julia release. | |
- "nightly" | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: actions/cache@v3 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.arch }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-${{ matrix.arch }}-test- | |
${{ runner.os }}-${{ matrix.arch }}- | |
${{ runner.os }}- | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v3 | |
with: | |
file: lcov.info | |
- uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
parallel: true | |
path-to-lcov: lcov.info | |
finish: | |
name: Coveralls Finished | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |