diff --git a/.travis.yml b/.travis.yml index 19561e3..4055444 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,13 @@ os: - linux - osx julia: - - 0.6 + - 0.7 + - 1.0 - nightly +matrix: + allow_failures: + - julia: nightly notifications: email: false -script: - - if [[ -a .git/shallow ]]; then git fetch --unshallow; fi - - julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("WAV"); Pkg.test("WAV"; coverage=true)' after_success: -- julia -e 'cd(Pkg.dir("WAV")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())' +- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())' diff --git a/REQUIRE b/REQUIRE index da4bc59..aac9ce8 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,3 +1,2 @@ -julia 1.0 +julia 0.7 FileIO 0.2.0 -Compat 0.62 diff --git a/appveyor.yml b/appveyor.yml index 3cb4c44..eef793e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,9 +1,18 @@ 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" + - julia_version: 0.7 + - julia_version: 1 + - julia_version: nightly + +platform: + - x86 # 32-bit + - x64 # 64-bit + +# Uncomment the following lines to allow failures on nightly julia +# (tests will run but not make your overall status red) +matrix: + allow_failures: + - julia_version: nightly branches: only: @@ -17,19 +26,18 @@ notifications: on_build_status_changed: false install: - - ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12" -# 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(), \"WAV\"); Pkg.build(\"WAV\")" + - echo "%JL_BUILD_SCRIPT%" + - C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%" test_script: - - C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"WAV\")" + - 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%" \ No newline at end of file diff --git a/src/AudioDisplay.jl b/src/AudioDisplay.jl index 19c449d..7dec81f 100644 --- a/src/AudioDisplay.jl +++ b/src/AudioDisplay.jl @@ -1,5 +1,5 @@ import Base.show -using Compat.Base64: base64encode +using Base64: base64encode struct WAVArray{T,N} Fs::Number diff --git a/src/WAV.jl b/src/WAV.jl index a5fd342..c48d2a0 100644 --- a/src/WAV.jl +++ b/src/WAV.jl @@ -6,8 +6,7 @@ export WAVChunk, WAVMarker, wav_cue_read, wav_cue_write, wav_info_write, wav_inf export WAVArray, WAVFormatExtension, WAVFormat export isextensible, isformat, bits_per_sample export WAVE_FORMAT_PCM, WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_ALAW, WAVE_FORMAT_MULAW -using Compat: codeunits, findall, nothing, Nothing, undef -import Compat: Libdl +import Libdl using FileIO function __init__() diff --git a/src/wavplay-audioqueue.jl b/src/wavplay-audioqueue.jl index dd3d0b9..ded2dff 100644 --- a/src/wavplay-audioqueue.jl +++ b/src/wavplay-audioqueue.jl @@ -2,8 +2,6 @@ module WAVPlay import ..wavplay -using Compat: Cvoid, undef - const OSStatus = Int32 const CFTypeRef = Ptr{Cvoid} const CFRunLoopRef = Ptr{Cvoid} diff --git a/src/wavplay-pulse.jl b/src/wavplay-pulse.jl index a83dfc0..e8810d5 100644 --- a/src/wavplay-pulse.jl +++ b/src/wavplay-pulse.jl @@ -2,8 +2,7 @@ module WAVPlay import ..wavplay -using Compat: Cvoid, undef -import Compat: Libdl +import Libdl # typedef enum pa_sample_format const PA_SAMPLE_U8 = 0 # Unsigned 8 Bit PCM diff --git a/test/runtests.jl b/test/runtests.jl index 0b88fba..35eefa8 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,9 +1,7 @@ ## -*-Julia-*- ## Test suite for Julia's WAV module import WAV -using Compat.Test -using Compat -using Compat: AbstractDisplay, findall, occursin, repr, String, undef +using Test # These float array comparison functions are from dists.jl function absdiff(current::AbstractArray{T}, target::AbstractArray{T}) where T <: Real @@ -251,7 +249,7 @@ seek(io, 4) chunk_size_old = WAV.read_le(io, UInt32) seek(io, 40) data_length_old = WAV.read_le(io, UInt32) -### Append second chunk to wav-file +### Append second chunk to wav-file WAV.wavappend( x1, io) @@ -259,12 +257,12 @@ seek(io, 4) chunk_size_new = WAV.read_le(io, UInt32) seek(io, 40) data_length_new = WAV.read_le(io, UInt32) -### Compare data lengths. +### Compare data lengths. data_length_old_in_samples = round(Int32, data_length_old/(number_channels*number_bits)*8) data_length_new_in_samples = round(Int32, data_length_new/(number_channels*number_bits)*8) -@test data_length_new_in_samples == 3*data_length_old_in_samples +@test data_length_new_in_samples == 3*data_length_old_in_samples @test (chunk_size_new-36) == 3*(chunk_size_old-36) ## Test native encoding of 8 bits @@ -320,7 +318,7 @@ end ## Test encoding 32 bit values for nchans = (1,2,4) - in_data_single = convert(Array{Float32}, reshape(Compat.range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans)) + in_data_single = convert(Array{Float32}, reshape(range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans)) io = IOBuffer() WAV.wavwrite(in_data_single, io) @@ -355,7 +353,7 @@ end ## Test encoding 64 bit values for nchans = (1,2,4) - in_data_single = convert(Array{Float64}, reshape(Compat.range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans)) + in_data_single = convert(Array{Float64}, reshape(range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans)) io = IOBuffer() WAV.wavwrite(in_data_single, io)