From 9aa7241afc2a21aa230574a3e8aced5ceaa25c3f Mon Sep 17 00:00:00 2001 From: Wynand Badenhorst Date: Thu, 7 Oct 2021 13:31:19 -0400 Subject: [PATCH] Rebuild TZData before benchmarking --- .github/workflows/CI.yml | 2 ++ Project.toml | 2 +- benchmark/benchmarks.jl | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index df2b5d56..7cd6b1fc 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -84,6 +84,8 @@ jobs: git fetch origin +:refs/remotes/origin/HEAD julia --project=benchmark/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))' julia --project=benchmark/ -e 'using PkgBenchmark, TimeZones; export_markdown(stdout, judge(TimeZones, "origin/HEAD", verbose=false))' + env: + TZDATA_VERSION: 2016j # Matches tzdata version used in tests doctest: name: Documentation - Julia ${{ matrix.version }} diff --git a/Project.toml b/Project.toml index 5e425c2f..6a5ff244 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "TimeZones" uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53" authors = ["Curtis Vogt "] -version = "1.5.7" +version = "1.5.8" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/benchmark/benchmarks.jl b/benchmark/benchmarks.jl index 5f0f4129..ca4ce4a1 100644 --- a/benchmark/benchmarks.jl +++ b/benchmark/benchmarks.jl @@ -1,7 +1,7 @@ using BenchmarkTools using Dates: Period, Day, Hour, DateFormat, @dateformat_str using TimeZones -using TimeZones.TZData: parse_components +using TimeZones.TZData: parse_components, build using Test: GenericString const SUITE = BenchmarkGroup() @@ -11,6 +11,10 @@ function gen_range(num_units::Period, tz::TimeZone) return StepRange(zdt, oneunit(num_units), zdt + num_units) end +# Ensure that when comparing benchmarks +# That the compiled TZData is compatible with this version +build("2016j") # version consistent with tests + include("tzdata.jl") include("interpret.jl") include("zoneddatetime.jl")