Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: stage the downstream tests #1705

Merged
merged 1 commit into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 112 additions & 0 deletions .github/workflows/hecke.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: HeckeCI

on:
pull_request:
branches:
- master
push:
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 }}
steps:
- uses: actions/checkout@v3
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- 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(\"HeckeCI.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}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: "Set up Oscar-dev configuration"
id: setupdev
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\",
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"
if: steps.setupdev.outputs.skiptests != 'true'
run: |
echo '${{ env.oscar_run_tests }}'
julia --color=yes --project=oscar-dev/project/ -e '${{ env.oscar_run_tests }}'
- name: "Run doctests"
if: steps.setupdev.outputs.skiptests != 'true'
run: |
echo '${{ env.oscar_run_doctests }}'
julia --color=yes --project=oscar-dev/project/ -e '${{ env.oscar_run_doctests }}'
112 changes: 112 additions & 0 deletions .github/workflows/singular.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: SingularCI

on:
pull_request:
branches:
- master
push:
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 }}
steps:
- uses: actions/checkout@v3
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '1.10'
- 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(\"SingularCI.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}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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: "Set up Oscar-dev configuration"
id: setupdev
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\",
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"
if: steps.setupdev.outputs.skiptests != 'true'
run: |
echo '${{ env.oscar_run_tests }}'
julia --color=yes --project=oscar-dev/project/ -e '${{ env.oscar_run_tests }}'
- name: "Run doctests"
if: steps.setupdev.outputs.skiptests != 'true'
run: |
echo '${{ env.oscar_run_doctests }}'
julia --color=yes --project=oscar-dev/project/ -e '${{ env.oscar_run_doctests }}'
10 changes: 10 additions & 0 deletions HeckeCI.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title = "metadata for Hecke CI run"

[env]
# os = [ "ubuntu-latest" ]
# julia-version = [ "~1.6.0-0" ]
# branches = [ "<matching>", "release" ]

[pkgs]
[pkgs.Hecke]
test = true
7 changes: 3 additions & 4 deletions OscarCI.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title = "metadata for oscar CI run"
title = "metadata for Oscar CI run"

[env]
# os = [ "ubuntu-latest" ]
Expand All @@ -10,8 +10,7 @@ title = "metadata for oscar CI run"
test = true

[pkgs.Singular]
test = true
test = false

[pkgs.Hecke]
test = true
testoptions = [ "short" ]
test = false
10 changes: 10 additions & 0 deletions SingularCI.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title = "metadata for Singular CI run"

[env]
# os = [ "ubuntu-latest" ]
# julia-version = [ "~1.6.0-0" ]
# branches = [ "<matching>", "release" ]

[pkgs]
[pkgs.Singular]
test = true
Loading