-
-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SnoopCompileBot #2832
Merged
Merged
Use SnoopCompileBot #2832
Changes from 16 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
12df81f
automate updating of precompilation files using SnoopCompileBot
daschw 3dd3808
don't run snoopcompilebot on nightly
daschw ddcf443
remove nightly in snoop_bot.jl
daschw fb402d9
don't include precompile_loader
daschw 86b9269
xvfb-run and update versions
daschw acd6cfa
string instead of versionnumber
daschw d0920ac
add GKS_ENCODING env variable
daschw 2511d21
actually use xvfb-run
daschw 3ea5217
add env variables for GR
daschw cfab4e3
skip statsplots testimages
daschw 4f791a3
don't display plotly plots
daschw 1661843
be explicit about julia versions
daschw 3f521b3
multios and run on 1.5
daschw a2aad6b
don't run on 1.5
daschw 032f76c
Update deps/SnoopCompile/snoop_bench.jl
daschw 6425ff8
Update deps/SnoopCompile/snoop_bot.jl
daschw fc89578
Update .github/workflows/SnoopCompile.yml
daschw dc81c6a
Update .github/workflows/SnoopCompile.yml
daschw a46ffbe
update 1.5 version specification in SnoopCompile.yml
daschw 79fac7a
use '1.5.0-rc1' until 1.5 is released
daschw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
name: SnoopCompile | ||
|
||
on: | ||
push: | ||
branches: | ||
# - 'master' # NOTE: to run the bot only on pushes to master | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
SnoopCompile: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
env: | ||
GKS_ENCODING: "utf8" | ||
GKSwstype: "100" | ||
PLOTS_TEST: "true" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: # NOTE: the versions below should match those in your botconfig | ||
- '1.3' | ||
- '1.4' | ||
# - '1.5' | ||
- 'nightly' | ||
os: # NOTE: should match the os setting of your botconfig | ||
- ubuntu-latest | ||
- windows-latest | ||
- macos-latest | ||
arch: | ||
- x64 | ||
steps: | ||
# Setup environment | ||
- uses: actions/checkout@v2 | ||
- uses: julia-actions/setup-julia@latest | ||
with: | ||
version: ${{ matrix.version }} | ||
- name: Install dependencies | ||
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: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: must match path | ||
# Run benchmarks | ||
- name: Running Benchmark | ||
run: $TESTCMD --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file | ||
- name: Upload all | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: ./ | ||
|
||
Create_PR: | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
needs: SnoopCompile | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download all | ||
uses: actions/download-artifact@v2 | ||
- name: Move the content of the directory to the root | ||
run: | | ||
rsync -a artifact/* ./ | ||
rm -d -r artifact | ||
- name: Discard unrelated changes | ||
run: | | ||
test -f 'Project.toml' && git checkout -- 'Project.toml' | ||
git ls-files 'Manifest.toml' | grep . && git checkout -- 'Manifest.toml' | ||
(git diff -w --no-color || git apply --cached --ignore-whitespace && git checkout -- . && git reset && git add -p) || echo done | ||
- name: Format precompile_includer.jl | ||
run: julia -e 'using Pkg; Pkg.add("JuliaFormatter"); using JuliaFormatter; format_file("src/precompile_includer.jl")' | ||
- name: Create Pull Request | ||
# https://github.com/marketplace/actions/create-pull-request | ||
uses: peter-evans/create-pull-request@v2 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update precompile_*.jl file | ||
# committer: Daniel Schwabender <[email protected]> # NOTE: change `committer` to your name and your email. | ||
title: "[AUTO] Update precompiles" | ||
labels: SnoopCompile | ||
branch: "SnoopCompile_AutoPR" | ||
|
||
|
||
Skip: | ||
if: "contains(github.event.head_commit.message, '[skip ci]')" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Skip CI 🚫 | ||
run: echo skip ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
using Plots | ||
|
||
Plots.test_examples(:gr, skip = Plots._backend_skips[:gr]) | ||
Plots.test_examples(:plotly, skip = Plots._backend_skips[:plotly], disp = false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using SnoopCompile | ||
|
||
snoop_bench( | ||
BotConfig( | ||
"Plots", | ||
yml_path= "SnoopCompile.yml", | ||
else_os = "linux", | ||
else_version = "1.4", | ||
), | ||
joinpath(@__DIR__, "precompile_script.jl"), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using SnoopCompile | ||
|
||
snoop_bot( | ||
BotConfig( | ||
"Plots", | ||
yml_path= "SnoopCompile.yml", | ||
else_os = "linux", | ||
else_version = "1.4", | ||
), | ||
joinpath(@__DIR__, "precompile_script.jl"), | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -250,7 +250,4 @@ end | |
|
||
const CURRENT_BACKEND = CurrentBackend(:none) | ||
|
||
include("precompile.jl") | ||
_precompile_() | ||
|
||
end # module |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enabling this since nightly is 1.6 now? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried but it did not work: https://github.com/daschw/Plots.jl/actions/runs/153176644
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All 1.5 tests are failing there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe try
-'1.5.0-rc1'
.@SaschaMann shouldn't 1.5 install
'1.5.0-rc1'
by default? julia-setup fails to do this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, let's try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With
1.5.0-0
I gethttps://github.com/daschw/Plots.jl/runs/824362165
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, it should've been
^1.5.0-0
. Sorry! 🤦There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does not work either: https://github.com/daschw/Plots.jl/actions/runs/155304982
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that's an issue with SnoopCompile.jl cc: @aminya