Skip to content

Commit

Permalink
Merge pull request #10 from JuliaPlots/sd/testing
Browse files Browse the repository at this point in the history
make sure tests at least run
  • Loading branch information
SimonDanisch authored May 27, 2021
2 parents c1d96d9 + 91157a4 commit 34e8465
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 41 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1.4'
- '1.6'
- 'nightly'
os:
- ubuntu-latest
arch:
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/RegisterAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: RegisterAction
on:
workflow_dispatch:
inputs:
version:
description: Version to register or component to bump
required: true

jobs:
register:
runs-on: ubuntu-latest
steps:
- uses: julia-actions/RegisterAction@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
44 changes: 5 additions & 39 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,42 +1,8 @@
# Profiling inference
using SnoopCompile, MakieCore, ProfileView

tinf = SnoopCompile.@snoopi_deep begin
s = MakieCore.Scene(500, 500)
scat = MakieCore.Scatter(randn(MakieCore.Point2f, 20)./2; strokecolor=:red)
push!(s, scat)
MakieCore.colorbuffer(s)
end

fg = flamegraph(tinf)
ProfileView.view(fg)
staleinstances(tinf) # still need to dive into this!
flat = flatten(tinf) # flat[end-10:end-1] to get top 10 offenders


# Generating precompiles
using MakieCore, SnoopCompile
SnoopCompile.@snoopc ["--project=$(pwd())"] "compiles.log" begin
using MakieCore
s = MakieCore.Scene(500, 500)
scat = MakieCore.Scatter(randn(MakieCore.Point2f, 20)./2; strokecolor=:red)
push!(s, scat)
MakieCore.colorbuffer(s)
nothing
end
data = SnoopCompile.read("compiles.log")
pc = SnoopCompile.format_userimg(reverse!(data[2]))
SnoopCompile.write(joinpath(@__DIR__, "..", "src", "precompile.jl"), pc)
using Test, MakieCore

# Main tests live in Makie.jl, but we should write some unit tests going forward!
using MakieCore: @recipe, Attributes

# Measuring ttfp
@time begin
using MakieCore
@time begin
s = MakieCore.Scene(500, 500)
scat = MakieCore.Scatter(randn(MakieCore.Point2f, 20)./2; strokecolor=:red)
push!(s, scat)
MakieCore.colorbuffer(s)
nothing
end
@recipe(MyPlot) do scene
Attributes(test = 222)
end

0 comments on commit 34e8465

Please sign in to comment.