Skip to content

Commit

Permalink
Provide error message instead of building Libtask (#56)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
devmotion and KDr2 authored Mar 30, 2020
1 parent a1ce1ea commit 4e201c5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/Testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ on:
# tags: '*'
release:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.0.5', '1.1.1', '1.2.0', '1.3.0', '1.4.0']
julia-arch: [x64, x86]
os: [ubuntu-latest, windows-latest, macOS-latest]
version:
- '1.0'
- '1.1'
- '1.2'
- '1.3'
- '1.4'
os:
- ubuntu-latest
- windows-latest
- macOS-latest
arch:
- x64
- x86
exclude:
- os: macOS-latest
julia-arch: x86
arch: x86

steps:
- uses: actions/checkout@v1.0.0
- uses: julia-actions/setup-julia@latest
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/julia-runtest@master
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.3.3"
version = "0.3.4"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Expand Down
1 change: 1 addition & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function find_prev_tag(tag)
project_root = (@__DIR__) |> dirname |> abspath
run(`git -C $project_root fetch --tags`)
tags = readlines(`git -C $project_root tag`)
sort!(tags)
idx = indexin([tag], tags)[1]
Expand Down
10 changes: 6 additions & 4 deletions src/Libtask.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ module Libtask

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

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

include("../deps/deps.jl"); check_deps();
include("taskcopy.jl")
include("tarray.jl")

Expand Down

2 comments on commit 4e201c5

@devmotion
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request updated: JuliaRegistries/General/11820

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" 4e201c561cd73c2fc22ccff854f5865ef4b06cc9
git push origin v0.3.4

Please sign in to comment.