Skip to content

Commit

Permalink
Updates for Julia 1.0
Browse files Browse the repository at this point in the history
Summary of changes:
* Add a Project.toml file for the package
* Deploy documentation on Julia 1.0 using a doc-specific Project.toml
* Test on Julia 0.7 and 1.0 on both Travis and AppVeyor, and modernize
  their setup
  • Loading branch information
ararslan committed Oct 23, 2018
1 parent 07bb0f2 commit ec5fac9
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 36 deletions.
19 changes: 14 additions & 5 deletions .travis.yml
Expand Up @@ -4,15 +4,24 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- 1.0
- nightly
notifications:
email: false
matrix:
allow_failures:
- julia: nightly
fast_finish: true
after_success:
# Push coverage results to Codecov.
- julia -e 'cd(Pkg.dir("FDM")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
# Build docs.
- julia -e 'Pkg.add("Documenter")'
- julia -e 'cd(Pkg.dir("FDM")); include(joinpath("docs", "make.jl"))'
- julia -e 'using Pkg; Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
jobs:
include:
- stage: "Documentation"
julia: 1.0
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))'
- julia --project=docs/ docs/make.jl
after_success: skip
14 changes: 14 additions & 0 deletions Project.toml
@@ -0,0 +1,14 @@
name = "FDM"
uuid = "e25cca7e-83ef-51fa-be6c-dfe2a3123128"
version = "0.2.0"

[deps]
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Random", "Test"]
2 changes: 0 additions & 2 deletions REQUIRE
@@ -1,3 +1 @@
julia 0.7
Printf
LinearAlgebra
50 changes: 22 additions & 28 deletions appveyor.yml
@@ -1,16 +1,16 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"

## uncomment the following lines to allow failures on nightly julia
## (tests will run but not make your overall status red)
#matrix:
# allow_failures:
# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: 0.7
- julia_version: 1
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

matrix:
allow_failures:
- julia_version: nightly

branches:
only:
Expand All @@ -24,24 +24,18 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# If there's a newer build queued for the same PR, cancel this one
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo();
Pkg.clone(pwd(), \"FDM\"); Pkg.build(\"FDM\")"
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia -e "Pkg.test(\"FDM\")"
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
5 changes: 5 additions & 0 deletions docs/Project.toml
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.19"
2 changes: 1 addition & 1 deletion docs/make.jl
Expand Up @@ -16,7 +16,7 @@ makedocs(

deploydocs(
repo = "github.com/invenia/FDM.jl.git",
julia = "0.6",
julia = "1.0",
target = "build",
deps = nothing,
make = nothing,
Expand Down

0 comments on commit ec5fac9

Please sign in to comment.