diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0502e87..5e7930d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,8 +41,9 @@ jobs: - os: macos-latest version: '1.6' include: - - version: 'nightly' - os: ubuntu-latest + - os: ubuntu-latest + version: 'nightly' + arch: x64 experimental: true steps: @@ -50,6 +51,7 @@ jobs: - uses: julia-actions/setup-julia@latest with: version: ${{ matrix.version }} + arch: ${{ matrix.arch }} - uses: julia-actions/cache@v1 - uses: julia-actions/julia-buildpkg@latest - uses: julia-actions/julia-runtest@latest diff --git a/test/runtests.jl b/test/runtests.jl index 95ddac9..843868a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -14,6 +14,11 @@ warn_ticks = :warn, "No strict ticks found" const C = RGBA{Float64} const C0 = RGBA{PlotUtils.Colors.N0f8} +bool_env(x, default::String = "0")::Bool = tryparse(Bool, get(ENV, x, default)) + +is_ci() = bool_env("CI") +is_64b() = Sys.WORD_SIZE == 64 + @testset "colors" begin @test plot_color(nothing) == C(0, 0, 0, 0) @test plot_color(false) == C(0, 0, 0, 0) @@ -120,7 +125,8 @@ end @test optimize_ticks(-1, 2) == ([-1.0, 0.0, 1.0, 2.0], -1.0, 2.0) # check if ticks still generate if max - min << abs(min) (i.e. for Float64 ranges) - @test optimize_ticks(1e11 - 1, 1e11 + 2) == (1e11 .+ (-1:2), 1e11 - 1.0, 1e11 + 2.0) + is_64b() && + @test optimize_ticks(1e11 - 1, 1e11 + 2) == (1e11 .+ (-1:2), 1e11 - 1.0, 1e11 + 2.0) @testset "dates" begin dt1, dt2 = Dates.value(DateTime(2000)), Dates.value(DateTime(2100)) @@ -158,6 +164,7 @@ end @testset "digits" begin @testset "digits $((10^n) - 1)*10^$i" for n ∈ 1:9, i ∈ -9:9 + (!is_64b() && n ≥ 9) && continue y0 = 10^n x0 = y0 - 1 x, y = (x0, y0) .* 10.0^i @@ -314,7 +321,16 @@ end @test stats.time < 1e-3 # ~ 0.22ms (on 1.9) end -if Sys.islinux() && VERSION ≥ v"1.9.0" && isempty(VERSION.prerelease) # avoid running on `nightly` +if ( + Sys.islinux() && + VERSION ≥ v"1.11.0" && + isempty(VERSION.prerelease) && # avoid running on `nightly` + is_64b() && + ( + !is_ci() || + (is_ci() && get(ENV, "GITHUB_EVENT_NAME", "pull_request") == "pull_request") + ) +) @testset "downstream" begin include("downstream.jl") end