Skip to content

Commit

Permalink
Try #207:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Feb 11, 2021
2 parents 2387ecb + 0416132 commit 4bd1415
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-julia-1.6-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- staging
- trying
tags: '*'
defaults:
run:
shell: bash
jobs:
CI-julia-1-6-nightly:
name: CI-julia-1-6-nightly
Expand Down Expand Up @@ -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()'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/ci-julia-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- staging
- trying
tags: '*'
defaults:
run:
shell: bash
jobs:
CI-julia-nightly:
name: CI-julia-nightly
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- staging
- trying
tags: '*'
defaults:
run:
shell: bash
jobs:
CI:
name: CI
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
14 changes: 8 additions & 6 deletions test/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 4bd1415

Please sign in to comment.