Skip to content

Commit 8726865

Browse files
committed
Try out the SnoopCompile bot.
1 parent 441d676 commit 8726865

File tree

4 files changed

+63
-0
lines changed

4 files changed

+63
-0
lines changed

.github/workflows/SnoopCompile.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: SnoopCompile
2+
3+
on:
4+
- push
5+
6+
7+
jobs:
8+
build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
julia-version: ['1.4']
13+
julia-arch: [x64]
14+
os: [ubuntu-latest]
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: julia-actions/setup-julia@latest
18+
with:
19+
version: ${{ matrix.julia-version }}
20+
- name: Install dependencies
21+
run: julia --project -e 'using Pkg; Pkg.instantiate();'
22+
- name : Add SnoopCompile and current package
23+
run: julia -e 'using Pkg; Pkg.add("SnoopCompile"); Pkg.develop(PackageSpec(; path=pwd()));'
24+
- name: Generating precompile files
25+
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopCompile.jl")'
26+
- name: Running Benchmark
27+
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopBenchmark.jl")'
28+
29+
# https://github.com/marketplace/actions/create-pull-request
30+
- name: Create Pull Request
31+
uses: peter-evans/create-pull-request@v2
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
commit-message: Update precompile_*.jl file
35+
committer: Tim Besard <tim.besard@gmail.com>
36+
title: 'Update precompile_*.jl file'
37+
labels: SnoopCompile
38+
branch: create-pull-request/SnoopCompile
39+
- name: Check output environment variable
40+
run: echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"

deps/SnoopCompile/snoopBenchmark.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using SnoopCompile
2+
3+
4+
println("loading infer benchmark")
5+
6+
@snoopi_bench "LLVM" using LLVM
7+
8+
9+
println("examples infer benchmark")
10+
11+
@snoopi_bench "LLVM" begin
12+
using LLVM
13+
examplePath = joinpath(dirname(dirname(pathof(LLVM))), "examples")
14+
include(joinpath(examplePath, "sum.jl"))
15+
end

deps/SnoopCompile/snoopCompile.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using SnoopCompile
2+
3+
# using runtests:
4+
@snoopi_bot "LLVM"

src/LLVM.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ include("interop.jl")
126126

127127
include("deprecated.jl")
128128

129+
# precompile
130+
#include("../deps/SnoopCompile/precompile/precompile_LLVM.jl")
131+
#_precompile_()
132+
129133

130134
## initialization
131135

0 commit comments

Comments
 (0)