diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml index fa47d7d..d94b38d 100644 --- a/.github/workflows/CompatHelper.yml +++ b/.github/workflows/CompatHelper.yml @@ -1,16 +1,32 @@ name: CompatHelper on: schedule: - - cron: '00 20 * * *' + - cron: 0 0 * * * workflow_dispatch: jobs: CompatHelper: runs-on: ubuntu-latest steps: - - name: Pkg.add("CompatHelper") - run: julia -e 'using Pkg; Pkg.add("CompatHelper")' - - name: CompatHelper.main() + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} - run: julia -e 'using CompatHelper; CompatHelper.main()' + # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b18c336..db66ce1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: version: - '0.7' - '1.0' + - '1.6' - '1' - 'nightly' os: diff --git a/Project.toml b/Project.toml index 29bcd03..66019ab 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Ratios" uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" authors = ["Tim Holy "] -version = "0.4.2" +version = "0.4.3" [deps] Requires = "ae029012-a4dd-5104-9daa-d747884805df" diff --git a/README.md b/README.md index 14de026..eab4a5c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Ratios -[![Build Status](https://travis-ci.org/timholy/Ratios.jl.svg?branch=master)](https://travis-ci.org/timholy/Ratios.jl) +[![CI](https://github.com/timholy/Ratios.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/timholy/Ratios.jl/actions/workflows/ci.yml) [![Coverage](https://codecov.io/gh/timholy/Ratios.jl/branch/master/graph/badge.svg?token=ZVcLnVyTBB)](https://codecov.io/gh/timholy/Ratios.jl) This package provides types similar to Julia's `Rational` type, which make some sacrifices but have better computational performance at the risk of greater risk of overflow. @@ -39,39 +39,12 @@ Stacktrace: [FastRationals](https://github.com/JeffreySarnoff/FastRationals.jl) is another package with safety and performance characteristics that lies somewhere between `SimpleRatio` and `Rational`: ```julia -julia> @benchmark x + y setup=((x, y) = (SimpleRatio(rand(-20:20), rand(2:20)), SimpleRatio(rand(-20:20), rand(2:20)))) -BenchmarkTools.Trial: 10000 samples with 1000 evaluations. - Range (min … max): 1.727 ns … 28.575 ns ┊ GC (min … max): 0.00% … 0.00% - Time (median): 1.739 ns ┊ GC (median): 0.00% - Time (mean ± σ): 1.753 ns ± 0.445 ns ┊ GC (mean ± σ): 0.00% ± 0.00% +julia> @btime x + y setup=((x, y) = (SimpleRatio(rand(-20:20), rand(2:20)), SimpleRatio(rand(-20:20), rand(2:20)))); + 1.969 ns (0 allocations: 0 bytes) - ▂ ▃ ▃ ▃ ▄ ▆ ▇ █ ▆ ▅ ▅ ▇ ▄ ▁ - ▂▁▂▁▃▁▅▁█▁█▁█▁█▁█▁█▁█▁█▁█▁█▁█▁▁█▁█▁█▁█▁▆▁▃▁▃▁▃▁▃▁▃▁▃▁▃▁▃▁▂ ▄ - 1.73 ns Histogram: frequency by time 1.76 ns < +julia> @btime x + y setup=((x, y) = (FastRational(rand(-20:20), rand(2:20)), FastRational(rand(-20:20), rand(2:20)))); + 3.192 ns (0 allocations: 0 bytes) - Memory estimate: 0 bytes, allocs estimate: 0. - -julia> @benchmark x + y setup=((x, y) = (FastRational(rand(-20:20), rand(2:20)), FastRational(rand(-20:20), rand(2:20)))) -BenchmarkTools.Trial: 10000 samples with 1000 evaluations. - Range (min … max): 3.192 ns … 89.167 ns ┊ GC (min … max): 0.00% … 0.00% - Time (median): 3.215 ns ┊ GC (median): 0.00% - Time (mean ± σ): 3.307 ns ± 1.820 ns ┊ GC (mean ± σ): 0.00% ± 0.00% - - ▃█▆█▃▂ - ▄███████▅▄▃▃▃▃▃▃▃▃▃▂▂▂▂▂▂▂▂▂▂▂▁▂▂▂▂▁▂▂▂▂▂▂▁▂▂▂▂▂▂▂▂▂▁▂▂▂▂▂ ▃ - 3.19 ns Histogram: frequency by time 3.45 ns < - - Memory estimate: 0 bytes, allocs estimate: 0. - -julia> @benchmark x + y setup=((x, y) = (Rational(rand(-20:20), rand(2:20)), Rational(rand(-20:20), rand(2:20)))) -BenchmarkTools.Trial: 10000 samples with 996 evaluations. - Range (min … max): 22.385 ns … 81.269 ns ┊ GC (min … max): 0.00% … 0.00% - Time (median): 32.777 ns ┊ GC (median): 0.00% - Time (mean ± σ): 33.162 ns ± 4.743 ns ┊ GC (mean ± σ): 0.00% ± 0.00% - - ▁ ▇ ▄▂ ▁▆▃ ▂█▃ ▁ ▇ ▁ ▁ - ▁▁▁▁▁▄▂▁▆▂▂█▄▃█▅▆█▇▇█████████████▅█▆▂▁█▇▁▂▁█▄▁▂▁▁▆▂▁▁▁▁▃▁▁▁ ▃ - 22.4 ns Histogram: frequency by time 45.8 ns < - - Memory estimate: 0 bytes, allocs estimate: 0. +julia> @btime x + y setup=((x, y) = (Rational(rand(-20:20), rand(2:20)), Rational(rand(-20:20), rand(2:20)))); + 23.065 ns (0 allocations: 0 bytes) ```