Skip to content

Commit 0e67ab1

Browse files
authored
Merge pull request #360 from Wynand/wy/clean-benchmark
Rebuild TZData before benchmarks
2 parents ae1e583 + 9aa7241 commit 0e67ab1

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ jobs:
8484
git fetch origin +:refs/remotes/origin/HEAD
8585
julia --project=benchmark/ -e 'using Pkg; Pkg.instantiate(); Pkg.develop(PackageSpec(path=pwd()))'
8686
julia --project=benchmark/ -e 'using PkgBenchmark, TimeZones; export_markdown(stdout, judge(TimeZones, "origin/HEAD", verbose=false))'
87+
env:
88+
TZDATA_VERSION: 2016j # Matches tzdata version used in tests
8789
8890
doctest:
8991
name: Documentation - Julia ${{ matrix.version }}

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "TimeZones"
22
uuid = "f269a46b-ccf7-5d73-abea-4c690281aa53"
33
authors = ["Curtis Vogt <curtis.vogt@gmail.com>"]
4-
version = "1.5.7"
4+
version = "1.5.8"
55

66
[deps]
77
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"

benchmark/benchmarks.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using BenchmarkTools
22
using Dates: Period, Day, Hour, DateFormat, @dateformat_str
33
using TimeZones
4-
using TimeZones.TZData: parse_components
4+
using TimeZones.TZData: parse_components, build
55
using Test: GenericString
66

77
const SUITE = BenchmarkGroup()
@@ -11,6 +11,10 @@ function gen_range(num_units::Period, tz::TimeZone)
1111
return StepRange(zdt, oneunit(num_units), zdt + num_units)
1212
end
1313

14+
# Ensure that when comparing benchmarks
15+
# That the compiled TZData is compatible with this version
16+
build("2016j") # version consistent with tests
17+
1418
include("tzdata.jl")
1519
include("interpret.jl")
1620
include("zoneddatetime.jl")

0 commit comments

Comments
 (0)