Skip to content

wrap more types

wrap more types #127

Workflow file for this run

name: OscarCI
on:
pull_request:
branches:
- master
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:
generatematrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
env:
PR_NUMBER: ${{ github.event.number || 0 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "eager"
steps:
- uses: actions/checkout@v3
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '~1.6.0-0'
- name: OscarDevTools - CI
if: github.repository == 'oscar-system/OscarDevTools.jl'
run: |
julia --project=oscar-dev -e "using Pkg;
Pkg.develop(PackageSpec(path=\".\"));
Pkg.instantiate();"
- name: fetch OscarDevTools
if: github.repository != 'oscar-system/OscarDevTools.jl'
run: |
julia --project=oscar-dev -e "using Pkg;
Pkg.add(PackageSpec(name=\"OscarDevTools\",version=\"0.2\"));
Pkg.instantiate();"
- id: set-matrix
run: |
julia --project=oscar-dev -e "using OscarDevTools.OscarCI;
ciprefs = parse_meta(\"OscarCI.toml\");
cimat = ci_matrix(ciprefs;
pr=${PR_NUMBER},
active_repo=\"${GITHUB_REPOSITORY}\");
@show cimat;
println(github_json(cimat));"
test-oscar:
needs: generatematrix
name: ${{ join(matrix.*.name) }} - ${{ matrix.os }}, julia ${{ matrix.julia-version}}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
env:
PR_NUMBER: ${{ github.event.number || 0 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JULIA_PKG_SERVER_REGISTRY_PREFERENCE: "eager"
strategy:
matrix: ${{fromJSON(needs.generatematrix.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: re-using OscarDevTools checkout
if: github.repository == 'oscar-system/OscarDevTools.jl'
run: |
julia --project=oscar-dev -e "using Pkg;
Pkg.develop(PackageSpec(path=\".\"));
Pkg.instantiate();"
- name: fetch OscarDevTools
if: github.repository != 'oscar-system/OscarDevTools.jl'
run: |
julia --project=oscar-dev -e "using Pkg;
Pkg.add(PackageSpec(name=\"OscarDevTools\",version=\"0.2\"));
Pkg.instantiate();"
- name: "Build and set override"
env:
TERM: linux
run: |
julia --project=oscar-dev/project/ test-prepare.jl --override --build --ignore-compat
- name: "Set up Oscar-dev configuration"
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: |
echo "$MATRIX_CONTEXT"
julia --project=oscar-dev -e "using OscarDevTools, OscarDevTools.OscarCI;
meta = job_meta_env(\"MATRIX_CONTEXT\");
oscar_develop(job_pkgs(meta);
dir=\"oscar-dev\",
merge=true,
active_repo=\"${GITHUB_REPOSITORY}\");
github_env_runtests(meta;
varname=\"oscar_run_tests\",
filename=\"${GITHUB_ENV}\");
github_env_run_doctests(meta;
varname=\"oscar_run_doctests\",
filename=\"${GITHUB_ENV}\");"
- name: "Run tests"
env:
TERM: linux
run: |
echo '${{ env.oscar_run_tests }}'
julia --project=oscar-dev/project/ -e '${{ env.oscar_run_tests }}'
- name: "Run doctests"
env:
TERM: linux
run: |
echo '${{ env.oscar_run_doctests }}'
rm -rf $HOME/.julia/scratchspaces/*/polymake_*
julia --project=oscar-dev/project/ -e '${{ env.oscar_run_doctests }}'