xvfb-run and update versions
This commit is contained in:
parent
fb402d9901
commit
86b92698cc
12
.github/workflows/SnoopCompile.yml
vendored
12
.github/workflows/SnoopCompile.yml
vendored
@ -18,7 +18,8 @@ jobs:
|
||||
matrix:
|
||||
version: # NOTE: the versions below should match those in your botconfig
|
||||
- '1'
|
||||
- '1.2'
|
||||
- '1.3'
|
||||
- 'nightly'
|
||||
os: # NOTE: should match the os setting of your botconfig
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
@ -26,6 +27,7 @@ jobs:
|
||||
arch:
|
||||
- x64
|
||||
steps:
|
||||
# Setup environment
|
||||
- uses: actions/checkout@v2
|
||||
- uses: julia-actions/setup-julia@latest
|
||||
with:
|
||||
@ -34,8 +36,16 @@ jobs:
|
||||
run: |
|
||||
julia --project -e 'using Pkg; Pkg.instantiate();'
|
||||
julia -e 'using Pkg; Pkg.add(PackageSpec(url = "https://github.com/timholy/SnoopCompile.jl")); Pkg.develop(PackageSpec(; path=pwd())); using SnoopCompile; SnoopCompile.addtestdep();'
|
||||
# TESTCMD
|
||||
- name: Default TESTCMD
|
||||
run: echo ::set-env name=TESTCMD::"julia"
|
||||
- name: Ubuntu TESTCMD
|
||||
if: startsWith(matrix.os,'ubuntu')
|
||||
run: echo ::set-env name=TESTCMD::"xvfb-run julia"
|
||||
# Generate precompile files
|
||||
- name: Generating precompile files
|
||||
run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: must match path
|
||||
# Run benchmarks
|
||||
- name: Running Benchmark
|
||||
run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file
|
||||
- name: Upload all
|
||||
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
||||
if: startsWith(matrix.os,'ubuntu')
|
||||
run: echo ::set-env name=TESTCMD::"xvfb-run julia"
|
||||
|
||||
# Julia Deoendencies
|
||||
# Julia Dependencies
|
||||
- name: Install Julia dependencies
|
||||
uses: julia-actions/julia-buildpkg@latest
|
||||
|
||||
|
||||
7
deps/SnoopCompile/snoop_bench.jl
vendored
7
deps/SnoopCompile/snoop_bench.jl
vendored
@ -1,6 +1,11 @@
|
||||
using SnoopCompile
|
||||
|
||||
snoop_bench(
|
||||
BotConfig("Plots", version = [v"1.2", v"1"]),
|
||||
BotConfig(
|
||||
"Plots",
|
||||
else_os = "linux",
|
||||
version = [v"1.3", v"1", "nightly"],
|
||||
else_version = v"1",
|
||||
),
|
||||
joinpath(@__DIR__, "precompile_script.jl"),
|
||||
)
|
||||
|
||||
7
deps/SnoopCompile/snoop_bot.jl
vendored
7
deps/SnoopCompile/snoop_bot.jl
vendored
@ -1,6 +1,11 @@
|
||||
using SnoopCompile
|
||||
|
||||
snoop_bot(
|
||||
BotConfig("Plots", version = [v"1.2", v"1"]),
|
||||
BotConfig(
|
||||
"Plots",
|
||||
else_os = "linux",
|
||||
version = [v"1.3", v"1", "nightly"],
|
||||
else_version = v"1",
|
||||
),
|
||||
joinpath(@__DIR__, "precompile_script.jl"),
|
||||
)
|
||||
|
||||
55
deps/generateprecompiles.jl
vendored
55
deps/generateprecompiles.jl
vendored
@ -1,55 +0,0 @@
|
||||
# To figure out what should be precompiled, run this script, then move
|
||||
# precompile_Plots.jl in precompiles_path (see below) to src/precompile.jl
|
||||
|
||||
# This script works by using SnoopCompile to log compilations that take place
|
||||
# while running the examples on the GR backend. So SnoopCompile must be
|
||||
# installed, and StatsPlots, RDatasets, and FileIO are also required for
|
||||
# certain examples.
|
||||
|
||||
# If precompilation fails with an UndefVarError for a module, probably what is
|
||||
# happening is that the module appears in the precompile statements, but is
|
||||
# only visible to one of Plots' dependencies, and not Plots itself. Adding the
|
||||
# module to the blacklist below will remove these precompile statements.
|
||||
|
||||
# Anonymous functions may appear in precompile statements as functions with
|
||||
# hashes in their name. Those of the form "#something##kw" have to do with
|
||||
# compiling functions with keyword arguments, and are named reproducibly, so
|
||||
# can be kept. Others generally will not work. Currently, SnoopCompile includes
|
||||
# some anonymous functions that not reproducible, but SnoopCompile PR #30
|
||||
# (which looks about to be merged) will ensure that anonymous functions are
|
||||
# actually defined before attempting to precompile them. Alternatively, we can
|
||||
# keep only the keyword argument related anonymous functions by changing the
|
||||
# regex that SnoopCompile uses to detect anonymous functions to
|
||||
# r"#{1,2}[^\"#]+#{1,2}\d+" (see anonrex in SnoopCompile.jl). To exclude all
|
||||
# precompile statements involving anonymous functions, "#" can also be added to
|
||||
# the blacklist below.
|
||||
|
||||
using SnoopCompile
|
||||
|
||||
project_flag = string("--project=", joinpath(homedir(), ".julia", "dev", "Plots"))
|
||||
log_path = joinpath(tempdir(), "compiles.log")
|
||||
precompiles_path = joinpath(tempdir(), "precompile")
|
||||
|
||||
# run examples with GR backend, logging what needs to be compiled
|
||||
SnoopCompile.@snoopc project_flag log_path begin
|
||||
using Plots
|
||||
Plots.test_examples(:gr)
|
||||
Plots.test_examples(:plotly, skip = Plots._backend_skips[:plotly])
|
||||
end
|
||||
|
||||
# precompile calls containing the following strings are dropped
|
||||
blacklist = [
|
||||
# functions defined in examples
|
||||
"PlotExampleModule",
|
||||
# the following are not visible to Plots, only its dependencies
|
||||
"CategoricalArrays",
|
||||
"FixedPointNumbers",
|
||||
"OffsetArrays",
|
||||
"SparseArrays",
|
||||
"StaticArrays",
|
||||
r"#{1,2}[^\"#]+#{1,2}\d+",
|
||||
]
|
||||
|
||||
data = SnoopCompile.read(log_path)
|
||||
pc = SnoopCompile.parcel(reverse!(data[2]), blacklist=blacklist)
|
||||
SnoopCompile.write(precompiles_path, pc)
|
||||
Loading…
x
Reference in New Issue
Block a user