now testing on 0.6, 0.7, and 1.0
This commit is contained in:
parent
f6213dc5ef
commit
b1e0183538
5 changed files with 59 additions and 10 deletions
19
.travis.yml
19
.travis.yml
|
@ -3,12 +3,27 @@ language: julia
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
sudo: required
|
||||
julia:
|
||||
- 0.6
|
||||
- 0.7
|
||||
- 1.0
|
||||
- nightly
|
||||
matrix:
|
||||
allow_failures:
|
||||
- julia: nightly
|
||||
fast_finish: true
|
||||
branches:
|
||||
only:
|
||||
master
|
||||
notifications:
|
||||
email: false
|
||||
script:
|
||||
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
|
||||
- julia -e 'Pkg.clone(pwd()); Pkg.build("PortAudio"); Pkg.test("PortAudio")'
|
||||
- julia --color=yes ci_setup.jl
|
||||
- julia --color=yes --code-coverage test/runtests.jl
|
||||
after_success:
|
||||
- julia -e 'VERSION >= v"0.7.0-" && using Pkg;
|
||||
VERSION < v"0.7.0-" && cd(Pkg.dir("PortAudio"));
|
||||
Pkg.add("Coverage");
|
||||
using Coverage;
|
||||
Codecov.submit(process_folder())'
|
||||
|
|
25
appveyor.yml
25
appveyor.yml
|
@ -1,8 +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/x64/julia-latest-win64.exe"
|
||||
- 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://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
|
||||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
|
||||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/1.0/julia-1.0-latest-win32.exe"
|
||||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0-latest-win64.exe"
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
# currently failing on 1.0 until https://github.com/JuliaLang/METADATA.jl/pull/16370 is merged
|
||||
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/1.0/julia-1.0-latest-win64.exe"
|
||||
|
||||
notifications:
|
||||
- provider: Email
|
||||
|
@ -10,6 +18,11 @@ notifications:
|
|||
on_build_failure: false
|
||||
on_build_status_changed: false
|
||||
|
||||
# only build master and PRs
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
install:
|
||||
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
|
||||
# Download most recent Julia Windows binary
|
||||
|
@ -22,8 +35,8 @@ install:
|
|||
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(), \"PortAudio\"); Pkg.build(\"PortAudio\")"
|
||||
- C:\projects\julia\bin\julia --color=yes ci_setup.jl
|
||||
|
||||
test_script:
|
||||
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"PortAudio\")"
|
||||
# - C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"SampledSignals\")"
|
||||
- C:\projects\julia\bin\julia --color=yes --code-coverage --check-bounds=yes test/runtests.jl
|
||||
|
|
16
ci_setup.jl
Normal file
16
ci_setup.jl
Normal file
|
@ -0,0 +1,16 @@
|
|||
VERSION >= v"0.7.0-" && using InteractiveUtils
|
||||
versioninfo()
|
||||
|
||||
if VERSION < v"0.7.0-"
|
||||
Pkg.clone(pwd(), "PortAudio")
|
||||
Pkg.build("PortAudio")
|
||||
# for now we need SampledSignals master
|
||||
Pkg.checkout("SampledSignals")
|
||||
else
|
||||
using Pkg
|
||||
# for now we need to `clone` because there's no way to specify the
|
||||
# package name for `add`
|
||||
Pkg.clone(pwd(), "PortAudio")
|
||||
Pkg.build("PortAudio")
|
||||
Pkg.add(PackageSpec(name="SampledSignals", rev="master"))
|
||||
end
|
|
@ -8,6 +8,7 @@ using Compat
|
|||
using Compat: undef, fetch, @compat
|
||||
using Compat.LinearAlgebra: transpose!
|
||||
using Compat: stdout
|
||||
using Compat.Sys: iswindows
|
||||
|
||||
import Base: eltype, show
|
||||
import Base: close, isopen
|
||||
|
@ -374,7 +375,7 @@ function set_global_callbacks()
|
|||
end
|
||||
|
||||
function suppress_err(dofunc::Function)
|
||||
nullfile = @static Sys.iswindows() ? "nul" : "/dev/null"
|
||||
nullfile = @static iswindows() ? "nul" : "/dev/null"
|
||||
open(nullfile, "w") do io
|
||||
redirect_stdout(dofunc, io)
|
||||
end
|
||||
|
|
|
@ -52,7 +52,11 @@ function test_callback(inchans, outchans, synced)
|
|||
write(sinkbuf, testout) # fill the output ringbuffer
|
||||
end
|
||||
# the process closure only has a pointer (not a ref) to sinkbuf
|
||||
GC.@preserve sinkbuf begin
|
||||
@static if VERSION >= v"0.7.0-"
|
||||
GC.@preserve sinkbuf begin
|
||||
@test process() == PortAudio.paContinue
|
||||
end
|
||||
else
|
||||
@test process() == PortAudio.paContinue
|
||||
end
|
||||
if outchans > 0
|
||||
|
|
Loading…
Reference in a new issue