Skip to content

Commit b60395b

Browse files
committed
fix: Use CompileBot instead of SnoopCompileBot
1 parent 361741b commit b60395b

File tree

4 files changed

+28
-81
lines changed

4 files changed

+28
-81
lines changed

.github/workflows/SnoopCompile.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
name: SnoopCompile
22

3-
4-
# Edit based on your repository.
53
on:
64
push:
75
branches:
8-
# - 'master'
6+
# - 'master' # NOTE: uncomment to run the bot only on pushes to master
97

108
defaults:
119
run:
@@ -17,33 +15,42 @@ jobs:
1715
runs-on: ${{ matrix.os }}
1816
strategy:
1917
fail-fast: false
18+
2019
matrix:
21-
# Uncomment other versions if you want multi-version signatures (should exactly match BotConfig.version):
22-
version:
20+
version: # NOTE: if not using `yml_path`, these should match the version in `BotConfig`
21+
- '1.6'
22+
- '1.5.3'
2323
- '1.4.2'
24-
# - '1.3.1'
24+
- '1.3.1'
2525
- '1.2.0'
26-
os:
26+
os: # NOTE: if not using `yml_path`, these should match the os in `BotConfig`
2727
- ubuntu-latest
2828
- windows-latest
2929
- macos-latest
3030
arch:
3131
- x64
32+
3233
steps:
3334
- uses: actions/checkout@v2
3435
- uses: julia-actions/setup-julia@latest
3536
with:
3637
version: ${{ matrix.version }}
38+
3739
- name: Install dependencies
3840
run: |
3941
julia --project -e 'using Pkg; Pkg.instantiate();'
40-
julia -e 'using Pkg; Pkg.add(PackageSpec(url = "https://github.com/aminya/SnoopCompile.jl", rev = "multios")); Pkg.develop(PackageSpec(; path=pwd())); using SnoopCompile; SnoopCompile.addtestdep();'
42+
julia -e 'using Pkg; Pkg.add( PackageSpec(name="CompileBot", version = "1") );
43+
Pkg.develop(PackageSpec(; path=pwd()));
44+
using CompileBot; CompileBot.addtestdep();'
45+
4146
- name: Generating precompile files
42-
run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")'
47+
run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: notice the path
48+
4349
- name: Running Benchmark
44-
run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")'
50+
run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file
51+
4552
- name: Upload all
46-
uses: actions/upload-artifact@v2
53+
uses: actions/upload-artifact@v2.0.1
4754
with:
4855
path: ./
4956

@@ -55,23 +62,16 @@ jobs:
5562
- uses: actions/checkout@v2
5663
- name: Download all
5764
uses: actions/download-artifact@v2
58-
- name: Move the content of the directory to the root
59-
run: |
60-
rsync -a artifact/* ./
61-
rm -d -r artifact
62-
- name: Discard unrelated changes
63-
run: |
64-
test -f 'Project.toml' && git checkout -- 'Project.toml'
65-
git ls-files 'Manifest.toml' | grep . && git checkout -- 'Manifest.toml'
66-
(git diff -w --no-color || git apply --cached --ignore-whitespace && git checkout -- . && git reset && git add -p) || echo done
67-
- name: Format precompile_includer.jl
68-
run: julia -e 'using Pkg; Pkg.add("JuliaFormatter"); using JuliaFormatter; format_file("src/precompile_includer.jl")'
65+
66+
- name: CompileBot postprocess
67+
run: julia -e 'using Pkg; Pkg.add( PackageSpec(name="CompileBot", version = "1") );
68+
using CompileBot; CompileBot.postprocess();'
69+
6970
- name: Create Pull Request
70-
uses: peter-evans/create-pull-request@v2
71+
uses: peter-evans/create-pull-request@v3
7172
with:
7273
token: ${{ secrets.GITHUB_TOKEN }}
7374
commit-message: Update precompile_*.jl file
74-
committer: Amin Yahyaabadi <[email protected]>
7575
title: "[AUTO] Update precompiles"
7676
labels: SnoopCompile
7777
branch: "SnoopCompile_AutoPR"

deps/SnoopCompile/snoop_bench.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using SnoopCompile
1+
using CompileBot
22

33
botconfig = BotConfig(
44
"AcuteML";
5-
os = ["linux", "windows", "macos"],
6-
version = [v"1.4.2", v"1.3.1"],
7-
blacklist = [],
8-
exhaustive = false,
5+
yml_path = "SnoopCompile.yml" # parse `os` and `version` from `SnoopCompile.yml`
96
)
107

118
println("Benchmarking the inference time of `using AcuteML`")

deps/SnoopCompile/snoop_bot.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
using SnoopCompile
1+
using CompileBot
22

33
botconfig = BotConfig(
44
"AcuteML";
5-
os = ["linux", "windows", "macos"],
6-
version = [v"1.4.2", v"1.3.1"],
7-
blacklist = [],
8-
exhaustive = false,
5+
yml_path = "SnoopCompile.yml" # parse `os` and `version` from `SnoopCompile.yml`
96
)
107

118
snoop_bot(

src/precompile_includer.jl

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)