Skip to content

Commit 9253328

Browse files
authored
Merge pull request #174 from devmotion/dw/julia_1_6
Support Julia LTS and update CompatHelper
2 parents 87b9489 + a4d26a3 commit 9253328

File tree

7 files changed

+54
-33
lines changed

7 files changed

+54
-33
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
version:
18-
- '1.8' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
18+
- '1.6' # Replace this with the minimum Julia version that your package supports. E.g. if your package requires Julia 1.5 or higher, change this to '1.5'.
1919
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
2020
- 'nightly'
2121
os:

.github/workflows/CompatHelper.yml

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
1-
name: CompatHelper
1+
# see the docs at https://github.com/JuliaRegistries/CompatHelper.jl
22

3+
name: CompatHelper
34
on:
45
schedule:
5-
- cron: '00 00 * * *'
6+
- cron: 0 0 * * *
67
workflow_dispatch:
7-
8+
permissions:
9+
contents: write
10+
pull-requests: write
811
jobs:
912
CompatHelper:
10-
runs-on: ${{ matrix.os }}
11-
strategy:
12-
matrix:
13-
julia-version: [1.2.0]
14-
julia-arch: [x86]
15-
os: [ubuntu-latest]
13+
runs-on: ubuntu-latest
1614
steps:
17-
- name: Pkg.add("CompatHelper")
18-
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
19-
- name: CompatHelper.main()
15+
- name: Check if Julia is already available in the PATH
16+
id: julia_in_path
17+
run: which julia
18+
continue-on-error: true
19+
- name: Install Julia, but only if it is not already available in the PATH
20+
uses: julia-actions/setup-julia@v1
21+
with:
22+
version: '1'
23+
arch: ${{ runner.arch }}
24+
if: steps.julia_in_path.outcome != 'success'
25+
- name: "Add the General registry via Git"
26+
run: |
27+
import Pkg
28+
ENV["JULIA_PKG_SERVER"] = ""
29+
Pkg.Registry.add("General")
30+
shell: julia --color=yes {0}
31+
- name: "Install CompatHelper"
32+
run: |
33+
import Pkg
34+
name = "CompatHelper"
35+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
36+
version = "3"
37+
Pkg.add(; name, uuid, version)
38+
shell: julia --color=yes {0}
39+
- name: "Run CompatHelper"
40+
run: |
41+
import CompatHelper
42+
CompatHelper.main()
43+
shell: julia --color=yes {0}
2044
env:
2145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22-
run: julia -e 'using CompatHelper; CompatHelper.main()'
46+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
47+

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DynamicHMC"
22
uuid = "bbc10e6e-7c05-544b-b16e-64fede858acb"
33
authors = ["Tamas K. Papp <tkpapp@gmail.com>"]
4-
version = "3.4.0"
4+
version = "3.4.1"
55

66
[deps]
77
ArgCheck = "dce04be8-c92d-5529-be00-80e4d2c0e197"
@@ -25,4 +25,4 @@ LogExpFunctions = "0.3"
2525
Parameters = "0.11, 0.12"
2626
ProgressMeter = "1"
2727
TensorCast = "0.4"
28-
julia = "1.8"
28+
julia = "1.6"

test/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"
1919

2020
[compat]
2121
LogDensityTestSuite = "0.6"
22-

test/jet.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
if VERSION >= v"1.7"
2-
using JET
3-
insert!(LOAD_PATH, 2, "..")
4-
@testset "static analysis with JET.jl" begin
5-
@test isempty(JET.get_reports(report_package(DynamicHMC, target_modules=(DynamicHMC,))))
6-
end
1+
using JET
2+
insert!(LOAD_PATH, 2, "..")
3+
@testset "static analysis with JET.jl" begin
4+
@test isempty(JET.get_reports(report_package(DynamicHMC, target_modules=(DynamicHMC,))))
75
end

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ include("sample-correctness_tests.jl")
4343
#### statis analysis
4444
####
4545

46-
if isempty(VERSION.prerelease) # do not test on nightly
46+
# do not test on older Julia versions and nightly
47+
if VERSION >= v"1.7" && isempty(VERSION.prerelease)
4748
include("jet.jl")
4849
end

test/sample-correctness_tests.jl

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,13 @@ end
7070
NUTS_tests(RNG, ℓ, "mixture of two normals", 1000; τ_alert = 0.15)
7171
end
7272

73-
if VERSION v"1.8" # FIXME why is it broken on 1.6? Some RNG issue?
74-
@testset "NUTS tests with heavier tails and skewness" begin
75-
K = 5
73+
@testset "NUTS tests with heavier tails and skewness" begin
74+
K = 5
7675

77-
= elongate(1.2, StandardMultivariateNormal(K))
78-
NUTS_tests(RNG, ℓ, "elongate(1.2, 𝑁)", 1000; p_alert = 1e-5, EBFMI_alert = 0.2)
76+
= elongate(1.2, StandardMultivariateNormal(K))
77+
NUTS_tests(RNG, ℓ, "elongate(1.2, 𝑁)", 1000; p_alert = 1e-5, EBFMI_alert = 0.2)
7978

80-
# this has very nasty tails to we relax requirements a bit
81-
= elongate(1.1, shift(ones(K), StandardMultivariateNormal(K)))
82-
NUTS_tests(RNG, ℓ, "skew elongate(1.1, 𝑁)", 10000; τ_alert = 0.1, EBFMI_alert = 0.2)
83-
end
79+
# this has very nasty tails to we relax requirements a bit
80+
= elongate(1.1, shift(ones(K), StandardMultivariateNormal(K)))
81+
NUTS_tests(RNG, ℓ, "skew elongate(1.1, 𝑁)", 10000; τ_alert = 0.1, EBFMI_alert = 0.2)
8482
end

0 commit comments

Comments
 (0)