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

Speedup CI 🪄 #507

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
julia-version: ["1.6", "1.7"]
os: [ubuntu-latest, macOS-latest]
group:
- 'test_on_default_compiler'
- 'test_manifolds'
- 'test_lie_groups'
steps:
Expand All @@ -27,6 +28,12 @@ jobs:
env:
PYTHON: ""
MANIFOLDS_TEST_GROUP: ${{ matrix.group }}
if: ${{ matrix.group == 'test_on_default_compiler' }}
- run: julia --color=yes --depwarn=yes --optimize=0 --compile=min --inline=yes --project=@. -e 'import Pkg;include(joinpath(ENV["GITHUB_ACTION_PATH"], "kwargs.jl"));kwargs = Kwargs.kwargs(;coverage = :(true),force_latest_compatible_version = :(auto), julia_args = ["--check-bounds=yes"]);Pkg.test(; kwargs...)'
shell: bash
env:
PYTHON: ""
if: ${{ matrix.group != 'test_on_default_compiler' }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
group:
- 'test_on_default_compiler'
- 'test_manifolds'
- 'test_lie_groups'
steps:
Expand All @@ -24,3 +25,10 @@ jobs:
env:
PYTHON: ""
MANIFOLDS_TEST_GROUP: ${{ matrix.group }}
if: ${{ matrix.group == 'test_on_default_compiler' }}
- run: julia --color=yes --depwarn=yes --optimize=0 --compile=min --inline=yes --project='@.' -e 'import Pkg; Pkg.test(;coverage = true, julia_args = ["--check-bounds=yes"])'
shell: bash
env:
PYTHON: ""
MANIFOLDS_TEST_GROUP: "${{ matrix.group}}"
if: ${{ matrix.group != 'test_on_default_compiler' }}
34 changes: 25 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,25 @@ include("utils.jl")
@testset "Manifolds.jl" begin
if TEST_GROUP ∈ ["all", "test_manifolds"]
include_test("differentiation.jl")

include_test("ambiguities.jl")

end
if TEST_GROUP ∈ ["all", "test_on_default_compiler"]
@info "\n Manifold Tests I\n"
include_test("manifolds/hyperbolic.jl")
include_test("manifolds/tucker.jl")
include_test("metric.jl")
include_test("statistics.jl")
include_test("approx_inverse_retraction.jl")
include_test("groups/general_linear.jl")
include_test("groups/special_linear.jl")
end
if TEST_GROUP ∈ ["all", "test_manifolds"]
@info "\n Manifold Tests II\n"
@nospecialize
if isdefined(Base, :Experimental) &&
isdefined(Base.Experimental, Symbol("@compiler_options"))
@eval Base.Experimental.@compiler_options compile = min optimize = 0
end
@testset "utils test" begin
Random.seed!(42)
@testset "usinc_from_cos" begin
Expand Down Expand Up @@ -126,11 +142,11 @@ include("utils.jl")
include_test("manifolds/generalized_grassmann.jl")
include_test("manifolds/generalized_stiefel.jl")
include_test("manifolds/grassmann.jl")
include_test("manifolds/hyperbolic.jl")
include_test("manifolds/lorentz.jl")
include_test("manifolds/multinomial_doubly_stochastic.jl")
include_test("manifolds/multinomial_symmetric.jl")
include_test("manifolds/positive_numbers.jl")
include_test("manifolds/power_manifold.jl")
include_test("manifolds/probability_simplex.jl")
include_test("manifolds/projective_space.jl")
include_test("manifolds/rotations.jl")
Expand All @@ -144,7 +160,6 @@ include("utils.jl")
include_test("manifolds/symmetric_positive_semidefinite_fixed_rank.jl")
include_test("manifolds/symplectic.jl")
include_test("manifolds/symplecticstiefel.jl")
include_test("manifolds/tucker.jl")
include_test("manifolds/unitary_matrices.jl")

include_test("manifolds/essential_manifold.jl")
Expand All @@ -154,25 +169,26 @@ include("utils.jl")

#meta manifolds
include_test("manifolds/product_manifold.jl")
include_test("manifolds/power_manifold.jl")
include_test("manifolds/quotient_manifold.jl")
include_test("manifolds/vector_bundle.jl")
include_test("manifolds/graph.jl")

include_test("metric.jl")
include_test("statistics.jl")
include_test("approx_inverse_retraction.jl")
end

if TEST_GROUP ∈ ["test_lie_groups", "all"]
@info "\nLie Group Tests\n"
@nospecialize
if isdefined(Base, :Experimental) &&
isdefined(Base.Experimental, Symbol("@compiler_options"))
@eval Base.Experimental.@compiler_options compile = min optimize = 0
end
# Lie groups and actions
include_test("groups/groups_general.jl")
include_test("groups/validation_group.jl")
include_test("groups/circle_group.jl")
include_test("groups/translation_group.jl")
include_test("groups/general_linear.jl")
include_test("groups/general_unitary_groups.jl")
include_test("groups/special_linear.jl")
include_test("groups/special_orthogonal.jl")
include_test("groups/heisenberg.jl")
include_test("groups/product_group.jl")
Expand Down
2 changes: 1 addition & 1 deletion test/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ using Test
using Graphs
using SimpleWeightedGraphs

function include_test(path)
function include_test(path::String)
@info "Testing $path"
@time include(path) # show basic timing, (this will print a newline at end)
end
Expand Down