Skip to content

Commit e7ce34e

Browse files
committed
Modernize the doc setup and add a Project file
1 parent f5e557d commit e7ce34e

File tree

8 files changed

+46
-35
lines changed

8 files changed

+46
-35
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*.jl.cov
22
*.jl.*.cov
33
*.jl.mem
4+
Manifest.toml
45
docs/build
56
docs/site
7+
docs/Manifest.toml

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ os:
44
- linux
55
julia:
66
- 0.7
7+
- 1.0
8+
- 1.1
79
- nightly
810
notifications:
911
email: false
@@ -12,6 +14,13 @@ notifications:
1214
# - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
1315
# - julia -e 'Pkg.clone(pwd()); Pkg.build("Primes"); Pkg.test("Primes"; coverage=true)'
1416
after_success:
15-
- julia -e 'Pkg.add("Coverage"); ps=Pkg.PackageSpec(name="Documenter", version="0.19"); Pkg.add(ps); Pkg.pin(ps)'
16-
- julia -e 'cd(Pkg.dir("Primes")); using Coverage; Coveralls.submit(Coveralls.process_folder())'
17-
- julia -e 'cd(Pkg.dir("Primes")); include(joinpath("docs", "make.jl"))'
17+
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
18+
jobs:
19+
include:
20+
- stage: "Documentation"
21+
julia: 1.0
22+
os: linux
23+
script:
24+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
25+
- julia --project=docs/ docs/make.jl
26+
after_success: skip

Project.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name = "Primes"
2+
uuid = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
3+
4+
[extras]
5+
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
6+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
7+
8+
[targets]
9+
test = ["DataStructures", "Test"]

REQUIRE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
julia 0.7-alpha
1+
julia 0.7

appveyor.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,26 @@
11
environment:
22
matrix:
3-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
5-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
6-
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
7-
3+
- julia_version: 0.7
4+
- julia_version: 1.0
5+
- julia_version: 1.1
6+
- julia_version: nightly
7+
platform:
8+
- x86 # 32-bit
9+
- x64 # 64-bit
810
branches:
911
only:
1012
- master
1113
- /release-.*/
12-
1314
notifications:
1415
- provider: Email
1516
on_build_success: false
1617
on_build_failure: false
1718
on_build_status_changed: false
18-
1919
install:
20-
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
21-
# If there's a newer build queued for the same PR, cancel this one
22-
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
23-
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
24-
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
25-
throw "There are newer queued builds for this pull request, failing early." }
26-
# Download most recent Julia Windows binary
27-
- ps: (new-object net.webclient).DownloadFile(
28-
$env:JULIA_URL,
29-
"C:\projects\julia-binary.exe")
30-
# Run installer silently, output to C:\projects\julia
31-
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
32-
20+
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))
3321
build_script:
34-
# Need to convert from shallow to complete for Pkg.clone to work
35-
- IF EXIST .git\shallow (git fetch --unshallow)
36-
- C:\projects\julia\bin\julia -e "versioninfo();
37-
Pkg.clone(pwd(), \"Primes\"); Pkg.build(\"Primes\")"
38-
22+
- echo "%JL_BUILD_SCRIPT%"
23+
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"
3924
test_script:
40-
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"Primes\")"
25+
- echo "%JL_TEST_SCRIPT%"
26+
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
Primes = "27ebfcd6-29c5-5fa9-bf4b-fb8fc14df3ae"
4+
5+
[compat]
6+
Documenter = "~0.20"

docs/make.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ using Documenter, Primes
22

33
makedocs(
44
modules = [Primes],
5-
clean = false,
6-
format = :html,
75
sitename = "Primes.jl",
86
pages = Any[
97
"Home" => "index.md",
@@ -12,9 +10,6 @@ makedocs(
1210
)
1311

1412
deploydocs(
15-
julia = "nightly",
1613
repo = "github.com/JuliaMath/Primes.jl.git",
1714
target = "build",
18-
deps = nothing,
19-
make = nothing,
2015
)

docs/src/api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
```@meta
2+
DocTestSetup = :(using Primes)
3+
```
4+
15
# Prime number functions
26

37
## Prime factorization

0 commit comments

Comments
 (0)