Skip to content

Commit 4e201c5

Browse files
devmotionKDr2
andauthored
Provide error message instead of building Libtask (#56)
* Provide error message instead of building Libtask * Add missing build step to CI * Don't run tests on Julia master (takes > 30 min) * Increase version number * fetch all tages to find the prev version Co-authored-by: KDr2 <[email protected]>
1 parent a1ce1ea commit 4e201c5

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

.github/workflows/Testing.yaml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,34 @@ on:
77
# tags: '*'
88
release:
99
pull_request:
10-
types: [opened, synchronize, reopened]
1110

1211
jobs:
1312
test:
1413
runs-on: ${{ matrix.os }}
1514
strategy:
1615
matrix:
17-
julia-version: ['1.0.5', '1.1.1', '1.2.0', '1.3.0', '1.4.0']
18-
julia-arch: [x64, x86]
19-
os: [ubuntu-latest, windows-latest, macOS-latest]
16+
version:
17+
- '1.0'
18+
- '1.1'
19+
- '1.2'
20+
- '1.3'
21+
- '1.4'
22+
os:
23+
- ubuntu-latest
24+
- windows-latest
25+
- macOS-latest
26+
arch:
27+
- x64
28+
- x86
2029
exclude:
2130
- os: macOS-latest
22-
julia-arch: x86
31+
arch: x86
2332

2433
steps:
25-
- uses: actions/checkout@v1.0.0
26-
- uses: julia-actions/setup-julia@latest
34+
- uses: actions/checkout@v2
35+
- uses: julia-actions/setup-julia@v1
2736
with:
28-
version: ${{ matrix.julia-version }}
29-
- uses: julia-actions/julia-runtest@master
37+
version: ${{ matrix.version }}
38+
arch: ${{ matrix.arch }}
39+
- uses: julia-actions/julia-buildpkg@latest
40+
- uses: julia-actions/julia-runtest@latest

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ 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.3.3"
6+
version = "0.3.4"
77

88
[deps]
99
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"

deps/build.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
function find_prev_tag(tag)
22
project_root = (@__DIR__) |> dirname |> abspath
3+
run(`git -C $project_root fetch --tags`)
34
tags = readlines(`git -C $project_root tag`)
45
sort!(tags)
56
idx = indexin([tag], tags)[1]

src/Libtask.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ module Libtask
22

33
export CTask, consume, produce, TArray, get, tzeros, tfill, TRef
44

5-
if !isfile(joinpath((@__DIR__) |> dirname, "deps/desp.jl"))
6-
import Pkg
7-
Pkg.build("Libtask")
5+
# Try to load the binary dependency
6+
if isfile(joinpath(@__DIR__, ".." , "deps", "deps.jl"))
7+
include("../deps/deps.jl")
8+
check_deps()
9+
else
10+
error("Libtask is not properly installed. Please run `import Pkg; Pkg.build(\"Libtask\")`")
811
end
912

10-
include("../deps/deps.jl"); check_deps();
1113
include("taskcopy.jl")
1214
include("tarray.jl")
1315

0 commit comments

Comments
 (0)