Skip to content

Commit

Permalink
CI: update doctests, Julia versions, OscarCI (#1345)
Browse files Browse the repository at this point in the history
- drop testing on Julia 1.7
- switch documentation CI, doctests, OscarCI to use Julia 1.8
  (this matches recent changes in Oscar.jl)
- sync `.github/workflows/oscar.yml` with `OscarDevTools.jl`
  • Loading branch information
fingolfin authored Apr 27, 2023
1 parent 128cb2f commit 20d7ab9
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 30 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@ jobs:
matrix:
julia-version:
- '1.6'
- '1.7'
- '1.8'
- '~1.9.0-0'
- 'nightly'
os:
- ubuntu-latest
include:
# Add a few windows and macOS jobs (not too many, the number we can run in parallel is limited)
- julia-version: '1.6'
- julia-version: '1.8'
os: macOS-latest
- julia-version: '1.6'
- julia-version: '1.8'
os: windows-latest

steps:
Expand Down Expand Up @@ -64,7 +63,7 @@ jobs:
with:
depwarn: error
- name: "Run doctests"
if: ${{ matrix.julia-version == '1.6' }}
if: ${{ matrix.julia-version == '1.8' }}
run: |
julia --project=docs --color=yes --code-coverage -e '
using Pkg
Expand All @@ -87,7 +86,7 @@ jobs:
- uses: actions/checkout@v3
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
version: '1.8'
- name: Cache artifacts
uses: actions/cache@v3
env:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/oscar.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: OscarCI

on:
push:
pull_request:
branches:
- master
pull_request:
push:
branches:
- master
workflow_dispatch:

concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
Expand All @@ -28,7 +29,7 @@ jobs:
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
with:
version: '~1.6.0-0'
version: '~1.8.0-0'
- name: OscarDevTools - CI
if: github.repository == 'oscar-system/OscarDevTools.jl'
run: |
Expand Down Expand Up @@ -82,6 +83,7 @@ jobs:
Pkg.add(PackageSpec(name=\"OscarDevTools\",version=\"0.2\"));
Pkg.instantiate();"
- name: "Set up Oscar-dev configuration"
id: setupdev
env:
MATRIX_CONTEXT: ${{ toJSON(matrix) }}
run: |
Expand All @@ -99,11 +101,12 @@ jobs:
filename=\"${GITHUB_ENV}\");"
- name: "Run tests"
if: steps.setupdev.outputs.skiptests != 'true'
run: |
echo '${{ env.oscar_run_tests }}'
julia --project=oscar-dev/project/ -e '${{ env.oscar_run_tests }}'
- name: "Run doctests"
if: matrix.julia-version == '~1.6.0-0' || matrix.julia-version == '1.6'
if: steps.setupdev.outputs.skiptests != 'true' && (matrix.julia-version == '~1.8.0-0' || matrix.julia-version == '1.8')
run: |
echo '${{ env.oscar_run_doctests }}'
julia --project=oscar-dev/project/ -e '${{ env.oscar_run_doctests }}'
4 changes: 2 additions & 2 deletions docs/src/fraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ julia> K = fraction_field(ZZ)
Rationals
julia> f = rand(K, -10:10)
-1//1
-1//3
julia> R, x = polynomial_ring(ZZ, "x")
(Univariate Polynomial Ring in x over Integers, x)
Expand All @@ -382,7 +382,7 @@ julia> S = fraction_field(R)
Fraction field of Univariate Polynomial Ring in x over Integers
julia> g = rand(S, -1:3, -10:10)
(-8*x^2 + 4*x + 6)//(8*x^3 - 5*x^2 + 6*x - 10)
(-4*x - 4)//(4*x^2 + x - 4)
```

### Extra functionality for factored fractions
Expand Down
21 changes: 10 additions & 11 deletions docs/src/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ julia> M = FreeModule(ZZ, 3)
Free module of rank 3 over Integers
julia> m1 = rand(M, -10:10)
(5, -5, 2)
(3, -1, 0)
julia> m2 = rand(M, -10:10)
(-6, -4, 8)
(4, 4, -7)
julia> S, f = sub(M, [m1, m2])
(Submodule over Integers with 2 generators and no relations, Module homomorphism with
Expand Down Expand Up @@ -259,10 +259,10 @@ julia> M = FreeModule(ZZ, 3)
Free module of rank 3 over Integers
julia> m1 = rand(M, -10:10)
(5, -5, 2)
(3, -1, 0)
julia> m2 = rand(M, -10:10)
(-6, -4, 8)
(4, 4, -7)
julia> S, f = sub(M, [m1, m2])
(Submodule over Integers with 2 generators and no relations, Module homomorphism with
Expand All @@ -271,20 +271,19 @@ Codomain: Free module of rank 3 over Integers)
julia> Q, g = quo(M, S)
(Quotient module over Integers with 2 generators and relations:
[50 -52], Module homomorphism with
[16 -21], Module homomorphism with
Domain: Free module of rank 3 over Integers
Codomain: Quotient module over Integers with 2 generators and relations:
[50 -52])
[16 -21])
julia> I, f = snf(Q)
(Invariant factor decomposed module over Integers with invariant factors BigInt[2, 0], Module isomorphism with
Domain: Invariant factor decomposed module over Integers with invariant factors BigInt[2, 0]
(Invariant factor decomposed module over Integers with invariant factors BigInt[0], Module isomorphism with
Domain: Invariant factor decomposed module over Integers with invariant factors BigInt[0]
Codomain: Quotient module over Integers with 2 generators and relations:
[50 -52])
[16 -21])
julia> invs = invariant_factors(Q)
2-element Vector{BigInt}:
2
1-element Vector{BigInt}:
0
```
Expand Down
4 changes: 2 additions & 2 deletions docs/src/mpolynomial.md
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,11 @@ julia> R, (x, y) = polynomial_ring(ZZ, ["x", "y"])
(Multivariate Polynomial Ring in x, y over Integers, AbstractAlgebra.Generic.MPoly{BigInt}[x, y])
julia> f = rand(R, -1:2, 3:5, -10:10)
-6*x^3*y^4
4*x^4*y^4
julia> S, (s, t) = polynomial_ring(GF(7), ["x", "y"])
(Multivariate Polynomial Ring in x, y over Finite field F_7, AbstractAlgebra.Generic.MPoly{AbstractAlgebra.GFElem{Int64}}[x, y])
julia> g = rand(S, -1:2, 3:5)
0
4*x^3*y^4
```
4 changes: 2 additions & 2 deletions docs/src/residue.md
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ julia> R = residue_ring(ZZ, 7)
Residue ring of Integers modulo 7
julia> f = rand(R, 0:6)
5
4
julia> S, x = polynomial_ring(QQ, "x")
(Univariate Polynomial Ring in x over Rationals, x)
Expand All @@ -336,5 +336,5 @@ julia> U = residue_field(S, x^3 + 3x + 1)
Residue field of Univariate Polynomial Ring in x over Rationals modulo x^3 + 3*x + 1
julia> g = rand(S, 2:2, -10:10)
-7//10*x^2 - 2*x - 3
-1//4*x^2 - 2//7*x + 1
```
2 changes: 1 addition & 1 deletion docs/src/series.md
Original file line number Diff line number Diff line change
Expand Up @@ -743,5 +743,5 @@ julia> R, x = power_series_ring(ZZ, 10, "x")
(Univariate power series ring in x over Integers, x + O(x^11))
julia> f = rand(R, 3:5, -10:10)
5*x^5 - 5*x^6 + 2*x^7 - 6*x^8 - 4*x^9 + 8*x^10 - 10*x^11 + 7*x^12 + 10*x^13 - 6*x^14 + O(x^15)
3*x^4 - x^5 + 4*x^7 + 4*x^8 - 7*x^9 + 2*x^10 + 4*x^11 - x^12 - 4*x^13 + O(x^14)
```
2 changes: 1 addition & 1 deletion docs/src/submodule.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ Domain: Submodule over Integers with 1 generator and no relations
Codomain: Free module of rank 2 over Integers)
julia> I = intersect(N1, N2)
Union{AbstractAlgebra.Generic.ModuleHomomorphism{BigInt}, AbstractAlgebra.Generic.Submodule{BigInt}}[]
Any[]
```
4 changes: 2 additions & 2 deletions docs/src/total_fraction.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ julia> K = total_ring_of_fractions(R)
Total ring of fractions of Residue ring of Integers modulo 12
julia> f = rand(K, 0:11)
8//7
7//5
julia> R, x = polynomial_ring(ZZ, "x")
(Univariate Polynomial Ring in x over Integers, x)
Expand All @@ -281,5 +281,5 @@ julia> S = total_ring_of_fractions(R)
Total ring of fractions of Univariate Polynomial Ring in x over Integers
julia> g = rand(S, -1:3, -10:10)
-4//(-6*x^3 + 10*x^2 + 7*x - 10)
(4*x + 4)//(-4*x^2 - x + 4)
```

0 comments on commit 20d7ab9

Please sign in to comment.