diff --git a/.github/workflows/SnoopCompile.yml b/.github/workflows/SnoopCompile.yml index 6532db18..817bdfca 100644 --- a/.github/workflows/SnoopCompile.yml +++ b/.github/workflows/SnoopCompile.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4eb858da..7d9db234 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/deps/SnoopCompile/snoop_bench.jl b/deps/SnoopCompile/snoop_bench.jl index 6089d195..51e3eeba 100644 --- a/deps/SnoopCompile/snoop_bench.jl +++ b/deps/SnoopCompile/snoop_bench.jl @@ -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"), ) diff --git a/deps/SnoopCompile/snoop_bot.jl b/deps/SnoopCompile/snoop_bot.jl index 8d16e0d7..6d4ff8af 100644 --- a/deps/SnoopCompile/snoop_bot.jl +++ b/deps/SnoopCompile/snoop_bot.jl @@ -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"), ) diff --git a/deps/generateprecompiles.jl b/deps/generateprecompiles.jl deleted file mode 100644 index e522982b..00000000 --- a/deps/generateprecompiles.jl +++ /dev/null @@ -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)