Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
Merge pull request #299 from JuliaGPU/tb/ci
Browse files Browse the repository at this point in the history
Simplify documentation generation
  • Loading branch information
maleadt authored Dec 11, 2018
2 parents 9189994 + a2ed251 commit 88cc320
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 41 deletions.
27 changes: 9 additions & 18 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ stages:
- postprocess

include:
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/common.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/test_v1.0.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/test_dev.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v0/postprocess_coverage.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v1/common.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v1/test_v1.0.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v1/test_dev.yml'
- 'https://raw.githubusercontent.com/JuliaGPU/gitlab-ci/master/templates/v1/coverage_dev.yml'

test:v1.0:
only:
Expand All @@ -29,30 +29,21 @@ coverage:
- staging
- trying

# Documenter.jl's `deploydocs` really is only made to work with Travis,
# so we need to fake quite a bit of environment in order for it to work.
# TODO: create an unconditional `deploydocs`, and pick when to deploy in here.
documentation:
stage: postprocess
image: juliagpu/julia:v1.0-cuda
variables:
DOCUMENTER_DEBUG: "true"
TRAVIS_REPO_SLUG: "JuliaGPU/CUDAnative.jl"
TRAVIS_BRANCH: $CI_COMMIT_REF_NAME
TRAVIS_TAG: $CI_COMMIT_TAG
dependencies:
- test:v1.0
script:
# gitlab-ce#15280
- apt update && apt install -y jq
- export PR_ID=$(curl -s "http://gitlab.ca/api/v4/projects/${CI_PROJECT_ID}/merge_requests?private_token=${OAUTH_TOKEN}&state=opened" | jq -r ".[]|select(.sha == \"$CI_COMMIT_SHA\")|.iid")
- export TRAVIS_PULL_REQUEST=$(if [ "$PR_ID" == "" ]; then echo "false"; else echo "true"; fi)

- apt install -y openssh-client && mkdir /root/.ssh
- julia --project=docs/ -e 'using Pkg;
Pkg.develop(PackageSpec(path=pwd()));
Pkg.build();
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
- mv docs/build public
artifacts:
paths:
- public
only:
- master
- staging
Expand Down
9 changes: 9 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ end

## main

# development often happens in lockstep with other packages,
# so check-out the master branch of those packages.
using Pkg
if haskey(ENV, "GITLAB_CI")
for package in ("CUDAdrv", "LLVM")
Pkg.add(PackageSpec(name=package, rev="master"))
end
end

const config_path = joinpath(@__DIR__, "ext.jl")
const previous_config_path = config_path * ".bak"

Expand Down
3 changes: 0 additions & 3 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.19"
10 changes: 0 additions & 10 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,3 @@ makedocs(
],
doctest = true
)

deploydocs(
repo = "github.com/JuliaGPU/CUDAnative.jl.git",
julia = "",
osname = "",
# no need to build anything here, re-use output of `makedocs`
target = "build",
deps = nothing,
make = nothing
)
2 changes: 1 addition & 1 deletion src/execution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ when function changes, or when different types or keyword arguments are provided
key = hash(ctx, key)
key = hash(kwargs, key)
for nf in 1:nfields(f)
# mix in the values of any captured value
# mix in the values of any captured variable
key = hash(getfield(f, nf), key)
end
if !haskey(compilecache, key)
Expand Down
9 changes: 0 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# development often happens in lockstep with other packages,
# so check-out the master branch of those packages.
using Pkg
if haskey(ENV, "GITLAB_CI")
for package in ("CUDAdrv", "LLVM")
Pkg.add(PackageSpec(name=package, rev="master"))
end
end

using CUDAnative, CUDAdrv
import LLVM

Expand Down

0 comments on commit 88cc320

Please sign in to comment.