Skip to content

Commit

Permalink
Merge pull request #6 from JuliaPlots/sd/release
Browse files Browse the repository at this point in the history
get ready to release
  • Loading branch information
SimonDanisch authored Mar 17, 2021
2 parents 417e0e7 + f611f24 commit d3766d1
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 25 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

name: CI
on:
pull_request:
branches:
- master
push:
branches:
- master
tags: '*'
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1' # Leave this line unchanged. '1' will automatically expand to the latest stable 1.x release of Julia.
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- name: Checkout
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 }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
file: lcov.info
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 * * *'

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 }}
run: julia -e 'using CompatHelper; CompatHelper.main()'
15 changes: 15 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: TagBot
on:
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.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
16 changes: 16 additions & 0 deletions .github/workflows/auto_close_all_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Auto-Close All Issues
on:
issues:
issue_comment:
jobs:
auto_close_all_issues:
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- if: github.actor != 'JuliaTagBot'
uses: peter-evans/close-issue@v1
with:
comment: |
We do not accept issues on the MakieTeX.jl repository.
Please open your issue on the Makie.jl repository instead:
https://github.com/JuliaPlots/Makie.jl/issues
22 changes: 0 additions & 22 deletions .gitlab-ci.yml

This file was deleted.

1 change: 1 addition & 0 deletions src/MakieTeX.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export TeXDocument, CachedTeX
export dvi2svg, latex2dvi, rsvg2recordsurf, svg2rsvg
export teximg, teximg!, TeXImg
export LTeX

end # document
13 changes: 10 additions & 3 deletions src/rendering.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
const DVISVGM_PATH = Ref(readchomp(`which dvisvgm`))
const DVISVGM_PATH = Ref{String}()

function dvisvg()
if !isassigned(DVISVGM_PATH)
DVISVGM_PATH[] = readchomp(`which dvisvgm`)
end
return DVISVGM_PATH[]
end

function compile_latex(
document::AbstractString;
Expand Down Expand Up @@ -42,7 +49,7 @@ function dvi2svg(
# dvisvgm a DVI file from stdin, and receive a SVG string from
# stdout. This greatly simplifies the pipeline, and anyone with
# a working TeX installation should have these utilities available.
dvisvgm = open(`$(DVISVGM_PATH[]) --bbox=$bbox $options --no-fonts --stdin --stdout`, "r+")
dvisvgm = open(`$(dvisvg()) --bbox=$bbox $options --no-fonts --stdin --stdout`, "r+")

write(dvisvgm, dvi)

Expand Down Expand Up @@ -112,7 +119,7 @@ function rsvg2img(handle::Rsvg.RsvgHandle, dpi = 72.0)
# Then, it's possible to store the image in a native Julia array,
# which simplifies the process of rendering.
d = Rsvg.handle_get_dimensions(handle)

# Cairo does not draw "empty" pixels, so we need to fill here
w, h = d.width, d.height
img = fill(Colors.ARGB32(1,1,1,0), w, h)
Expand Down

2 comments on commit d3766d1

@SimonDanisch
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 register()

@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 created: JuliaRegistries/General/32174

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.0.1 -m "<description of version>" d3766d1f86ad76d5ba884400068057649003df3e
git push origin v0.0.1

Please sign in to comment.