From ec5fac9769c7dfdfb5baab24efd0ec8d8d3cfc99 Mon Sep 17 00:00:00 2001 From: Alex Arslan Date: Tue, 23 Oct 2018 11:45:17 -0700 Subject: [PATCH] Updates for Julia 1.0 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 --- .travis.yml | 19 +++++++++++++----- Project.toml | 14 +++++++++++++ REQUIRE | 2 -- appveyor.yml | 50 +++++++++++++++++++++-------------------------- docs/Project.toml | 5 +++++ docs/make.jl | 2 +- 6 files changed, 56 insertions(+), 36 deletions(-) create mode 100644 Project.toml create mode 100644 docs/Project.toml diff --git a/.travis.yml b/.travis.yml index f3e9716d..e972fdb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Project.toml b/Project.toml new file mode 100644 index 00000000..068caceb --- /dev/null +++ b/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"] diff --git a/REQUIRE b/REQUIRE index 0f02f379..859ad461 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1 @@ julia 0.7 -Printf -LinearAlgebra diff --git a/appveyor.yml b/appveyor.yml index 5f2e9a49..4f179d3c 100644 --- a/appveyor.yml +++ b/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: @@ -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%" diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 00000000..53bc6f84 --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,5 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" + +[compat] +Documenter = "~0.19" diff --git a/docs/make.jl b/docs/make.jl index ac2c38ad..6d965a3f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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,