Skip to content

Commit

Permalink
adding correct raw url
Browse files Browse the repository at this point in the history
and fixing tests
  • Loading branch information
schlichtanders committed Jan 31, 2024
1 parent fe14444 commit b811c91
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 39 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,3 @@ jobs:
- uses: codecov/codecov-action@v3
with:
files: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
permissions:
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
contents: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v1
with:
version: '1'
- uses: julia-actions/cache@v1
- name: Configure doc environment
shell: julia --project=docs --color=yes {0}
run: |
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run doctests
shell: julia --project=docs --color=yes {0}
run: |
using Documenter: DocMeta, doctest
using JuliaScript
DocMeta.setdocmeta!(JuliaScript, :DocTestSetup, :(using JuliaScript); recursive=true)
doctest(JuliaScript)
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

[![Build Status](https://github.com/jolin-io/JuliaScript.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/jolin-io/JuliaScript.jl/actions/workflows/CI.yml?query=branch%3Amain)

## You have a julia script.jl and want to run it fast?
**You have a julia script.jl and want to run it fast?** Welcome to `juliascript`! It is build for exactly that purpose.

Welcome to `juliascript` which was build for exactly that purpose.
## Installlation

1. Make sure [`julia` is installed via juliaup](https://github.com/JuliaLang/juliaup)
2. Then run the following in a linux bash terminal
```bash
curl -o ~/.juliaup/bin/juliascript -fsSL
curl -o ~/.juliaup/bin/juliascript -fsSL https://raw.githubusercontent.com/jolin-io/JuliaScript.jl/main/bin/juliascript
chmod +x ~/.juliaup/bin/juliascript
```

Expand Down
2 changes: 1 addition & 1 deletion src/Helpers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function myhash(script_content)
end

function get_cache_name(script_path)
content = readchomp(script_path)
content = read(script_path, String)
get_cache_name(script_path, content)
end

Expand Down
12 changes: 7 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if Sys.islinux()

# always start with clean caching directory
rm(cache_path, recursive=true, force=true)
@test !isdir(cache_path)

target = strip("""
9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08
Expand All @@ -21,16 +22,17 @@ if Sys.islinux()

# run first time
@test readchomp(`bash $exe_file $script_file 42`) == target
@test isdir(cache_path)

# run second time
@test readchomp(`bash $exe_file $script_file 42`) == target

# packagecompile
@test readchomp(`bash $exe_file packagecompile $script_file`) == target

# run again
# run after packagecompile
readchomp(`bash $exe_file packagecompile $script_file`)
@test isfile(joinpath(cache_path, "sysimage.so"))
@test readchomp(`bash $exe_file $script_file 42`) == target


# TODO compare timings? they should always be in order kind of
# TODO compare timings? they should always be in order (kind of)
end
end

0 comments on commit b811c91

Please sign in to comment.