Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Libtask_jll #76

Merged
merged 11 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/BuildDylib.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CompatHelper
on:
schedule:
- cron: '00 00 * * *'
workflow_dispatch:
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Pkg.add("CompatHelper")
run: julia -e 'using Pkg; Pkg.add("CompatHelper")'
- name: CompatHelper.main()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run: julia -e 'using CompatHelper; CompatHelper.main()'
9 changes: 6 additions & 3 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: TagBot
on:
schedule:
- cron: 0 * * * *
issue_comment:
types:
- created
workflow_dispatch:
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.DEPLOY_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
21 changes: 13 additions & 8 deletions .github/workflows/Testing.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
name: Libtask Testing

on:
push:
branches:
- master
# tags: '*'
release:
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.version == 'nightly' }}
strategy:
matrix:
version:
- '1.0'
- '1.1'
- '1.2'
- '1.3'
- '1.4'
- '1'
- 'nightly'
os:
- ubuntu-latest
Expand All @@ -31,12 +25,23 @@ jobs:
exclude:
- os: macOS-latest
arch: x86

steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- if: ${{ matrix.version == 'nightly' }}
run: julia --color=yes --project -e 'using Pkg; Pkg.add(PackageSpec(url="https://github.com/JuliaBinaryWrappers/Libtask_jll.jl.git"))'
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
10 changes: 4 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
license = "MIT"
desc = "C shim for task copying in Turing"
repo = "https://github.com/TuringLang/Libtask.jl.git"
version = "0.4.2"
version = "0.5.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows us to backport and release bugfixes for Julia < 1.3 in Libtask 0.4.* if needed.


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

[compat]
BinaryProvider = "0.5"
julia = "1"
Libtask_jll = "0.4"
julia = "1.3"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand Down
43 changes: 16 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Libtask
[![Libtask Testing](https://github.com/TuringLang/Libtask.jl/workflows/Libtask%20Testing/badge.svg)](https://github.com/TuringLang/Libtask.jl/actions)
[![Dylib Build](https://github.com/TuringLang/Libtask.jl/workflows/Build%20Dylib/badge.svg)](https://github.com/TuringLang/Libtask.jl/actions)

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

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

Expand Down Expand Up @@ -90,28 +89,18 @@ a = copy(ctask)

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).

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).

## For Developer

### Release a new version
- If you have updates of the binary dylib (files under the `deps`
directory), you should:
- Update the version/commit information in [this
file](https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/Libtask/build_tarballs.jl)
by a pull request
- Wait for that PR being merged, then you will find a new
release of the dylib
[here](https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/releases)
- Then, in the root directory of the Yggdrasil project, run
`https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/releases`,
you will get a build file like
`build/build_Libtask.v0.3.1.jl`. Copy the binary download
information (the variables `bin_prefix` and `download_info`)
from that generated file to `deps/build.jl` in our repo and
commit the changes.
- If you don't make any changes about the dylib, just ignore the
first step and go to next one.
- Update the new version number in `Project.toml`, ping
@JuliaRegistrator with `@JuliaRegistrator register` in a
comment.
## 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).

## Julia nightly

Libtask uses the `libtask_julia` library which is pre-built for Julia versions 1.3, 1.4, and 1.5 and
distributed via the [Libtask_jll](https://github.com/JuliaBinaryWrappers/Libtask_jll.jl/) package.

Julia nightly might not be compatible with the latest version of the `libtask_julia` library and is
not officially supported. If you want to use Julia nightly, you have to add the Libtask_jll package
manually:
```julia
julia> ] add https://github.com/JuliaBinaryWrappers/Libtask_jll.jl.git
```
49 changes: 0 additions & 49 deletions deps/Makefile

This file was deleted.

59 changes: 0 additions & 59 deletions deps/build.jl

This file was deleted.

59 changes: 0 additions & 59 deletions deps/build_dylib.sh

This file was deleted.

Loading