Skip to content

Commit

Permalink
Try out the SnoopCompile bot.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed May 1, 2020
1 parent 441d676 commit 8726865
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/SnoopCompile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: SnoopCompile

on:
- push


jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.4']
julia-arch: [x64]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.julia-version }}
- name: Install dependencies
run: julia --project -e 'using Pkg; Pkg.instantiate();'
- name : Add SnoopCompile and current package
run: julia -e 'using Pkg; Pkg.add("SnoopCompile"); Pkg.develop(PackageSpec(; path=pwd()));'
- name: Generating precompile files
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopCompile.jl")'
- name: Running Benchmark
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopBenchmark.jl")'

# https://github.com/marketplace/actions/create-pull-request
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update precompile_*.jl file
committer: Tim Besard <tim.besard@gmail.com>
title: 'Update precompile_*.jl file'
labels: SnoopCompile
branch: create-pull-request/SnoopCompile
- name: Check output environment variable
run: echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
15 changes: 15 additions & 0 deletions deps/SnoopCompile/snoopBenchmark.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using SnoopCompile


println("loading infer benchmark")

@snoopi_bench "LLVM" using LLVM


println("examples infer benchmark")

@snoopi_bench "LLVM" begin
using LLVM
examplePath = joinpath(dirname(dirname(pathof(LLVM))), "examples")
include(joinpath(examplePath, "sum.jl"))
end
4 changes: 4 additions & 0 deletions deps/SnoopCompile/snoopCompile.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
using SnoopCompile

# using runtests:
@snoopi_bot "LLVM"
4 changes: 4 additions & 0 deletions src/LLVM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ include("interop.jl")

include("deprecated.jl")

# precompile
#include("../deps/SnoopCompile/precompile/precompile_LLVM.jl")
#_precompile_()


## initialization

Expand Down

0 comments on commit 8726865

Please sign in to comment.