diff --git a/.github/workflows/ci-julia-1.6-nightly.yml b/.github/workflows/ci-julia-1.6-nightly.yml index 2424d3abf..06c3e56cc 100644 --- a/.github/workflows/ci-julia-1.6-nightly.yml +++ b/.github/workflows/ci-julia-1.6-nightly.yml @@ -6,6 +6,9 @@ on: - staging - trying tags: '*' +defaults: + run: + shell: bash jobs: CI-julia-1-6-nightly: name: CI-julia-1-6-nightly @@ -39,6 +42,7 @@ jobs: ${{ runner.os }}- - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia --project=test --check-bounds=yes --code-coverage=user --depwarn=yes test/runtests.jl - run: julia -e 'using Pkg; pkg"add Run@0.1"' - run: julia -e 'using Run; Run.prepare_test()' - run: julia -e 'using Run; Run.test()' diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index f05c981a9..32cf24a37 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -6,6 +6,9 @@ on: - staging - trying tags: '*' +defaults: + run: + shell: bash jobs: CI-julia-nightly: name: CI-julia-nightly diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe4b4166d..0a2bcbf38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,9 @@ on: - staging - trying tags: '*' +defaults: + run: + shell: bash jobs: CI: name: CI @@ -58,7 +61,6 @@ jobs: with: version: '1' - run: julia --color=yes -e 'using Pkg; VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General")) && Pkg.Registry.add("General")' - shell: bash env: JULIA_PKG_SERVER: "" - run: | @@ -80,7 +82,6 @@ jobs: with: version: 'nightly' - run: julia --color=yes -e 'using Pkg; VERSION >= v"1.5-" && !isdir(joinpath(DEPOT_PATH[1], "registries", "General")) && Pkg.Registry.add("General")' - shell: bash env: JULIA_PKG_SERVER: "" - run: | diff --git a/test/examples.jl b/test/examples.jl index e86fa0437..5cd84ff3b 100644 --- a/test/examples.jl +++ b/test/examples.jl @@ -15,12 +15,14 @@ examples_dir = joinpath(@__DIR__, "..", "examples") examples = find_sources(examples_dir) filter!(file -> readline(file) != "# EXCLUDE FROM TESTING", examples) -cd(examples_dir) do - examples = relpath.(examples, Ref(examples_dir)) - @testset for example in examples - cmd = `$(Base.julia_cmd()) --project=$(Base.current_project()) $example` - @test success(pipeline(cmd, stderr=stderr)) - end +@testset "$(basename(example))" for example in examples + code = """ + $(Base.load_path_setup_code()) + include($(repr(example))) + """ + cmd = `$(Base.julia_cmd()) --startup-file=no -e $code` + @debug "Testing $example" Text(code) cmd + @test success(pipeline(cmd, stderr=stderr)) end end diff --git a/test/runtests.jl b/test/runtests.jl index 384f15436..fc8e8299e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,3 +1,18 @@ +@info( + "Start testing with:", + pwd(), + Base.current_project(), + Base.load_path(), + Text(Base.load_path_setup_code()), +) +let Pkg = Base.require(Base.PkgId( + Base.UUID("44cfe95a-1eb2-52ea-b672-e2afdf69b78f"), + "Pkg", + )) + Pkg.status(mode = Pkg.PKGMODE_MANIFEST) +end +@info "Trying to `using KernelAbstractions` etc..." + using KernelAbstractions using CUDAKernels using Test