fix two tests in preparation for julia nightly #11875
Workflow file for this run
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: Run tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
# group by workflow and ref; the last slightly strange component ensures that for pull | |
# requests, we limit to 1 concurrent job, but for the master branch we don't | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }} | |
# Cancel intermediate builds, but only if it is a pull request build. | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 150 | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: | |
- '1.6' | |
- '1.9' | |
- '~1.10.0-0' | |
- 'nightly' | |
group: [ 'short', 'long' ] | |
os: | |
- ubuntu-latest | |
depwarn: [ '' ] | |
include: | |
# Add a single job per group with deprecation errors on the most recent stable julia version | |
- julia-version: '1.9' | |
os: ubuntu-latest | |
group: 'short' | |
depwarn: 'depwarn=error' | |
- julia-version: '1.9' | |
os: ubuntu-latest | |
group: 'long' | |
depwarn: 'depwarn=error' | |
# Add a few macOS jobs (not too many, the number we can run in parallel is limited) | |
- julia-version: 'nightly' | |
os: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# For Codecov, we must also fetch the parent of the HEAD commit to | |
# be able to properly deal with PRs / merges | |
fetch-depth: 2 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
- name: "Build package" | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: "limit OpenMP threads" | |
if: runner.os == 'macOS' | |
# restrict number of openMP threads on macOS due to oversubscription | |
run: echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV | |
- name: "set test subgroup" | |
if: ${{ matrix.group }} != '' | |
run: echo "OSCAR_TEST_SUBSET=${{matrix.group}}" >> $GITHUB_ENV | |
- name: "Run tests" | |
uses: julia-actions/julia-runtest@latest | |
with: | |
annotate: ${{ matrix.julia-version == '1.9' }} | |
coverage: ${{ matrix.julia-version == '1.9' }} | |
depwarn: ${{ matrix.depwarn == 'depwarn=error' && 'error' || 'no' }} | |
- name: "Process code coverage" | |
if: matrix.julia-version == '1.9' && matrix.depwarn != 'depwarn=error' | |
uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,experimental | |
- name: "Upload coverage data to Codecov" | |
if: matrix.julia-version == '1.9' && matrix.depwarn != 'depwarn=error' | |
continue-on-error: true | |
uses: codecov/codecov-action@v3 | |
doctest: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 150 | |
strategy: | |
fail-fast: false | |
matrix: | |
julia-version: | |
- '1.9' | |
- '~1.10.0-0' | |
- 'nightly' | |
os: | |
- ubuntu-latest | |
depwarn: [ '' ] | |
include: | |
# Add a single job with deprecation errors on the most recent stable julia version | |
- julia-version: '1.9' | |
os: ubuntu-latest | |
depwarn: 'depwarn=error' | |
# Add macOS jobs (not too many, the number we can run in parallel is limited) | |
- julia-version: '1.9' | |
os: macOS-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# For Codecov, we must also fetch the parent of the HEAD commit to | |
# be able to properly deal with PRs / merges | |
fetch-depth: 2 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
- name: "Build package" | |
uses: julia-actions/julia-buildpkg@v1 | |
- name: "limit OpenMP threads" | |
if: runner.os == 'macOS' | |
# restrict number of openMP threads on macOS due to oversubscription | |
run: echo "OMP_NUM_THREADS=1" >> $GITHUB_ENV | |
- name: "Run tests" | |
# HACK: since macOS runners are so expensive, we reuse this one to run | |
# both regular tests and doctests | |
if: runner.os == 'macOS' | |
uses: julia-actions/julia-runtest@latest | |
with: | |
annotate: ${{ matrix.julia-version == '1.9' }} | |
coverage: ${{ matrix.julia-version == '1.9' }} | |
depwarn: ${{ matrix.depwarn == 'depwarn=error' && 'error' || 'no' }} | |
- name: "Setup package" | |
run: | | |
julia --project=docs --color=yes -e ' | |
using Pkg | |
Pkg.develop(PackageSpec(path=pwd())) | |
Pkg.instantiate()' | |
- name: "Run doctests" | |
run: | | |
julia ${{ matrix.julia-version == '1.9' && '--code-coverage' || '' }} \ | |
--project=docs --depwarn=${{ matrix.depwarn == 'depwarn=error' && 'error' || 'no' }} --color=yes -e' | |
using Documenter | |
include("docs/documenter_helpers.jl") | |
using Oscar | |
DocMeta.setdocmeta!(Oscar, :DocTestSetup, Oscar.doctestsetup(); recursive = true) | |
doctest(Oscar)' | |
- name: "Process code coverage" | |
if: matrix.julia-version == '1.9' && matrix.depwarn != 'depwarn=error' | |
uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,experimental | |
- name: "Upload coverage data to Codecov" | |
if: matrix.julia-version == '1.9' && matrix.depwarn != 'depwarn=error' | |
continue-on-error: true | |
uses: codecov/codecov-action@v3 |