Skip to content

Commit b315b92

Browse files
authored
Merge branch 'main' into dw/varname
2 parents 3ac8cbd + b7a2e48 commit b315b92

File tree

6 files changed

+140
-3
lines changed

6 files changed

+140
-3
lines changed

.github/workflows/CI.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
12+
runs-on: ${{ matrix.os }}
13+
continue-on-error: ${{ matrix.version == 'nightly' }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
version:
18+
- '1'
19+
- '1.0'
20+
- 'nightly'
21+
os:
22+
- ubuntu-latest
23+
- macOS-latest
24+
- windows-latest
25+
arch:
26+
- x64
27+
include:
28+
- version: '1'
29+
os: ubuntu-latest
30+
arch: x64
31+
coverage: true
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: julia-actions/setup-julia@v1
35+
with:
36+
version: ${{ matrix.version }}
37+
arch: ${{ matrix.arch }}
38+
- uses: actions/cache@v1
39+
env:
40+
cache-name: cache-artifacts
41+
with:
42+
path: ~/.julia/artifacts
43+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
44+
restore-keys: |
45+
${{ runner.os }}-test-${{ env.cache-name }}-
46+
${{ runner.os }}-test-
47+
${{ runner.os }}-
48+
- uses: julia-actions/julia-buildpkg@v1
49+
- uses: julia-actions/julia-runtest@v1
50+
- uses: julia-actions/julia-processcoverage@v1
51+
if: matrix.coverage
52+
- uses: codecov/codecov-action@v1
53+
if: matrix.coverage
54+
with:
55+
file: lcov.info
56+
- uses: coverallsapp/github-action@master
57+
if: matrix.coverage
58+
with:
59+
github-token: ${{ secrets.GITHUB_TOKEN }}
60+
path-to-lcov: lcov.info

.github/workflows/CompatHelper.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: '00 00 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
CompatHelper:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Pkg.add("CompatHelper")
11+
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
12+
- name: CompatHelper.main()
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} # for triggering CI
16+
run: julia -e 'using CompatHelper; CompatHelper.main(; subdirs=["", "test"])'

.github/workflows/IntegrationTest.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: IntegrationTest
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test:
11+
name: ${{ matrix.package.repo }}
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
package:
17+
- {user: TuringLang, repo: DynamicPPL.jl}
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: julia-actions/setup-julia@v1
21+
with:
22+
version: 1
23+
arch: x64
24+
- uses: julia-actions/julia-buildpkg@latest
25+
- name: Clone Downstream
26+
uses: actions/checkout@v2
27+
with:
28+
repository: ${{ matrix.package.user }}/${{ matrix.package.repo }}
29+
path: downstream
30+
- name: Load this and run the downstream tests
31+
shell: julia --color=yes --project=downstream {0}
32+
run: |
33+
using Pkg
34+
try
35+
# force it to use this PR's version of the package
36+
Pkg.develop(PackageSpec(path=".")) # resolver may fail with main deps
37+
Pkg.update()
38+
Pkg.test() # resolver may fail with test time deps
39+
catch err
40+
err isa Pkg.Resolve.ResolverError || rethrow()
41+
# If we can't resolve that means this is incompatible by SemVer and this is fine
42+
# It means we marked this as a breaking change, so we don't need to worry about
43+
# Mistakenly introducing a breaking change, as we have intentionally made one
44+
@info "Not compatible with this release. No problem." exception=err
45+
exit(0) # Exit immediately, as a success
46+
end

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# AbstractPPL.jl
22

3+
[![CI](https://github.com/TuringLang/AbstractPPL.jl/workflows/CI/badge.svg?branch=master)](https://github.com/TuringLang/AbstractPPL.jl/actions?query=workflow%3ACI+branch%3Amaster)
4+
[![IntegrationTest](https://github.com/TuringLang/AbstractPPL.jl/workflows/IntegrationTest/badge.svg?branch=master)](https://github.com/TuringLang/AbstractPPL.jl/actions?query=workflow%3AIntegrationTest+branch%3Amaster)
5+
[![Coverage Status](https://coveralls.io/repos/github/TuringLang/AbstractPPL.jl/badge.svg?branch=master)](https://coveralls.io/github/TuringLang/AbstractPPL.jl?branch=master)
6+
[![Codecov](https://codecov.io/gh/TuringLang/AbstractPPL.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/TuringLang/AbstractPPL.jl)
7+
38
A new light-weight package to factor out interfaces and associated APIs for probabilistic
49
programming languages (especially their modelleing languages). The overall goals are creating an
510
abstract type and minimal set of functions that will be supported all model and trace types. Some

test/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
33
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4+
5+
[compat]
6+
Documenter = "0.26.3"
7+
julia = "1"

test/runtests.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# Activate test environment on older Julia versions
2+
if VERSION < v"1.2"
3+
using Pkg: Pkg
4+
Pkg.activate(@__DIR__)
5+
Pkg.develop(Pkg.PackageSpec(; path=dirname(@__DIR__)))
6+
Pkg.instantiate()
7+
end
8+
19
using AbstractPPL
210
using Documenter
311
using Test
@@ -9,9 +17,7 @@ using Test
917
DocMeta.setdocmeta!(
1018
AbstractPPL,
1119
:DocTestSetup,
12-
quote
13-
using AbstractPPL
14-
end;
20+
:(using AbstractPPL);
1521
recursive=true,
1622
)
1723
doctest(AbstractPPL; manual=false)

0 commit comments

Comments
 (0)