Skip to content

Commit a664d3d

Browse files
authored
Use Libtask_jll (#76)
* Use Libtask_jll * Update README * Add CompatHelper * Bump version * Do not test old Julia versions * Do not export `get` * Clean list of dependencies * Update to Libtask_jll 0.4 * Add Libtask_jll manually on Julia nightly * Add cache * Add section to README
1 parent 7b9540a commit a664d3d

13 files changed

+110
-444
lines changed

Diff for: .github/workflows/BuildDylib.yaml

-31
This file was deleted.

Diff for: .github/workflows/CompatHelper.yml

+16
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 }}
16+
run: julia -e 'using CompatHelper; CompatHelper.main()'

Diff for: .github/workflows/TagBot.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: TagBot
22
on:
3-
schedule:
4-
- cron: 0 * * * *
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
57
jobs:
68
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
710
runs-on: ubuntu-latest
811
steps:
912
- uses: JuliaRegistries/TagBot@v1
1013
with:
11-
token: ${{ secrets.DEPLOY_TOKEN }}
14+
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/Testing.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
name: Libtask Testing
2-
32
on:
43
push:
54
branches:
65
- master
7-
# tags: '*'
8-
release:
96
pull_request:
10-
117
jobs:
128
test:
139
runs-on: ${{ matrix.os }}
1410
continue-on-error: ${{ matrix.version == 'nightly' }}
1511
strategy:
1612
matrix:
1713
version:
18-
- '1.0'
19-
- '1.1'
20-
- '1.2'
2114
- '1.3'
2215
- '1.4'
2316
- '1'
@@ -32,12 +25,23 @@ jobs:
3225
exclude:
3326
- os: macOS-latest
3427
arch: x86
35-
3628
steps:
3729
- uses: actions/checkout@v2
3830
- uses: julia-actions/setup-julia@v1
3931
with:
4032
version: ${{ matrix.version }}
4133
arch: ${{ matrix.arch }}
34+
- uses: actions/cache@v1
35+
env:
36+
cache-name: cache-artifacts
37+
with:
38+
path: ~/.julia/artifacts
39+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
40+
restore-keys: |
41+
${{ runner.os }}-test-${{ env.cache-name }}-
42+
${{ runner.os }}-test-
43+
${{ runner.os }}-
44+
- if: ${{ matrix.version == 'nightly' }}
45+
run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaBinaryWrappers/Libtask_jll.jl.git"))'
4246
- uses: julia-actions/julia-buildpkg@latest
4347
- uses: julia-actions/julia-runtest@latest

Diff for: Project.toml

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
33
license = "MIT"
44
desc = "C shim for task copying in Turing"
55
repo = "https://github.com/TuringLang/Libtask.jl.git"
6-
version = "0.4.2"
6+
version = "0.5.0"
77

88
[deps]
9-
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
10-
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
11-
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
9+
Libtask_jll = "3ae2931a-708c-5973-9c38-ccf7496fb450"
1210

1311
[compat]
14-
BinaryProvider = "0.5"
15-
julia = "1"
12+
Libtask_jll = "0.4"
13+
julia = "1.3"
1614

1715
[extras]
1816
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

Diff for: README.md

+16-27
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Libtask
2-
[![Libtask Testing](https://github.com/TuringLang/Libtask.jl/workflows/Libtask%20Testing/badge.svg)](https://github.com/TuringLang/Libtask.jl/actions)
3-
[![Dylib Build](https://github.com/TuringLang/Libtask.jl/workflows/Build%20Dylib/badge.svg)](https://github.com/TuringLang/Libtask.jl/actions)
42

3+
[![Libtask Testing](https://github.com/TuringLang/Libtask.jl/workflows/Libtask%20Testing/badge.svg)](https://github.com/TuringLang/Libtask.jl/actions?branch=master)
54

65
C shim for [task copying](https://github.com/JuliaLang/julia/issues/4085) in Turing
76

@@ -90,28 +89,18 @@ a = copy(ctask)
9089

9190
Note: The [Turing](https://github.com/TuringLang/Turing.jl) probabilistic programming language uses this task copying feature in an efficient implementation of the [particle filtering](https://en.wikipedia.org/wiki/Particle_filter) sampling algorithm for arbitary order [Markov processes](https://en.wikipedia.org/wiki/Markov_model#Hidden_Markov_model).
9291

93-
Disclaimer: This feature is still experimental and should only be used with caution. Some discussions on its potential caveats can be found [here](https://github.com/JuliaLang/julia/pull/15078).
94-
95-
## For Developer
96-
97-
### Release a new version
98-
- If you have updates of the binary dylib (files under the `deps`
99-
directory), you should:
100-
- Update the version/commit information in [this
101-
file](https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/Libtask/build_tarballs.jl)
102-
by a pull request
103-
- Wait for that PR being merged, then you will find a new
104-
release of the dylib
105-
[here](https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/releases)
106-
- Then, in the root directory of the Yggdrasil project, run
107-
`https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/releases`,
108-
you will get a build file like
109-
`build/build_Libtask.v0.3.1.jl`. Copy the binary download
110-
information (the variables `bin_prefix` and `download_info`)
111-
from that generated file to `deps/build.jl` in our repo and
112-
commit the changes.
113-
- If you don't make any changes about the dylib, just ignore the
114-
first step and go to next one.
115-
- Update the new version number in `Project.toml`, ping
116-
@JuliaRegistrator with `@JuliaRegistrator register` in a
117-
comment.
92+
## Disclaimer
93+
94+
This feature is still experimental and should only be used with caution. Some discussions on its potential caveats can be found [here](https://github.com/JuliaLang/julia/pull/15078).
95+
96+
## Julia nightly
97+
98+
Libtask uses the `libtask_julia` library which is pre-built for Julia versions 1.3, 1.4, and 1.5 and
99+
distributed via the [Libtask_jll](https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/) package.
100+
101+
Julia nightly might not be compatible with the latest version of the `libtask_julia` library and is
102+
not officially supported. If you want to use Julia nightly, you have to add the Libtask_jll package
103+
manually:
104+
```julia
105+
julia> ] add https://github.com/JuliaBinaryWrappers/Libtask_jll.jl.git
106+
```

Diff for: deps/Makefile

-49
This file was deleted.

Diff for: deps/build.jl

-59
This file was deleted.

Diff for: deps/build_dylib.sh

-59
This file was deleted.

0 commit comments

Comments
 (0)