Skip to content

Commit 14a924a

Browse files
committed
Merge branch 'master' of github.com:aminya/AcuteML.jl
2 parents 267156f + 9544eb6 commit 14a924a

15 files changed

+582
-105
lines changed

.github/workflows/SnoopCompile.yml

Lines changed: 61 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,85 @@
11
name: SnoopCompile
22

3+
4+
# Edit based on your repository.
35
on:
4-
- push
6+
push:
7+
branches:
8+
# - 'master'
59

10+
defaults:
11+
run:
12+
shell: bash
613

714
jobs:
8-
build:
15+
SnoopCompile:
16+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
917
runs-on: ${{ matrix.os }}
1018
strategy:
19+
fail-fast: false
1120
matrix:
12-
julia-version: ['1.4.0-rc1']
13-
julia-arch: [x64]
14-
os: [ubuntu-latest]
21+
# Uncomment other versions if you want multi-version signatures (should exactly match BotConfig.version):
22+
version:
23+
- '1.4.2'
24+
# - '1.3.1'
25+
- '1.2.0'
26+
os:
27+
- ubuntu-latest
28+
- windows-latest
29+
- macos-latest
30+
arch:
31+
- x64
1532
steps:
1633
- uses: actions/checkout@v2
1734
- uses: julia-actions/setup-julia@latest
1835
with:
19-
version: ${{ matrix.julia-version }}
36+
version: ${{ matrix.version }}
2037
- 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: Install Test dependencies
25-
run: julia -e 'using SnoopCompile; SnoopCompile.addtestdep()'
38+
run: |
39+
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();'
2641
- name: Generating precompile files
27-
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopCompile.jl")'
42+
run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")'
2843
- name: Running Benchmark
29-
run: julia --project=@. -e 'include("deps/SnoopCompile/snoopBenchmark.jl")'
30-
44+
run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")'
45+
- name: Upload all
46+
uses: actions/upload-artifact@v2
47+
with:
48+
path: ./
3149

32-
# https://github.com/marketplace/actions/create-pull-request
50+
Create_PR:
51+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
52+
needs: SnoopCompile
53+
runs-on: ubuntu-latest
54+
steps:
55+
- uses: actions/checkout@v2
56+
- name: Download all
57+
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")'
3369
- name: Create Pull Request
3470
uses: peter-evans/create-pull-request@v2
3571
with:
3672
token: ${{ secrets.GITHUB_TOKEN }}
3773
commit-message: Update precompile_*.jl file
3874
committer: Amin Yahyaabadi <[email protected]>
39-
title: '[AUTO] Update precompile_*.jl file'
75+
title: "[AUTO] Update precompiles"
4076
labels: SnoopCompile
41-
branch: create-pull-request/SnoopCompile
42-
- name: Check output environment variable
43-
run: echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
77+
branch: "SnoopCompile_AutoPR"
78+
79+
80+
Skip:
81+
if: "contains(github.event.head_commit.message, '[skip ci]')"
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: Skip CI 🚫
85+
run: echo skip ci

deps/SnoopCompile/example_script.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Run the tests
2+
testdir = joinpath(dirname(dirname(@__DIR__)), "test")
3+
include("$testdir/runtests.jl")
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
function _precompile_()
2+
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
3+
Base.precompile(Tuple{Core.kwftype(typeof(AcuteML.render2file)),NamedTuple{(:id, :age, :field, :GPA, :courses),Tuple{Int64,Int64,String,Float64,Array{String,1}}},typeof(render2file),String,Bool})
4+
Base.precompile(Tuple{typeof(AcuteML.aml_create),Expr,Array{Union{Expr, Symbol},1},Array{Any,1},Array{Union{Expr, Symbol, Type},1},Array{Union{Expr, Symbol},1},Array{Union{Missing, String},1},Array{Union{Missing, Function, Symbol},1},Array{Union{Missing, Type},1},String,Type,Array{Union{Missing, Function, Symbol},0},Bool,Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Expr})
5+
Base.precompile(Tuple{typeof(AcuteML.aml_create),Expr,Array{Union{Expr, Symbol},1},Array{Any,1},Array{Union{Expr, Symbol, Type},1},Array{Union{Expr, Symbol},1},Array{Union{Missing, String},1},Array{Union{Missing, Function, Symbol},1},Array{Union{Missing, Type},1},String,Type,Array{Union{Missing, Function, Symbol},0},Bool,Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Symbol})
6+
Base.precompile(Tuple{typeof(AcuteML.aml_parse),Expr})
7+
Base.precompile(Tuple{typeof(AcuteML.findfirsttext),Int64,Node})
8+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlcreator),Expr,Bool,Expr,Expr,String,Type,Expr,QuoteNode,Expr})
9+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlcreator),Nothing,Bool,Expr,Expr,String,Type,Expr,QuoteNode,Expr})
10+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlextractor),Nothing,Bool,Expr,Expr,String,Type,Expr,QuoteNode,Expr})
11+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmludpater),Nothing,Bool,Expr,Expr,String,Type,Expr,QuoteNode,Expr})
12+
Base.precompile(Tuple{typeof(AcuteML.get_struct_xmlcreator),Expr,Array{Any,1},Array{Union{Expr, Symbol},1},Nothing,Expr,Array{Expr,1},Array{Expr,1},Nothing})
13+
Base.precompile(Tuple{typeof(AcuteML.get_struct_xmlextractor),Expr,Array{Any,1},Array{Expr,1},Nothing,Array{Expr,1},Nothing})
14+
Base.precompile(Tuple{typeof(AcuteML.multiString),Array{String,1}})
15+
Base.precompile(Tuple{typeof(AcuteML.multiString),Float64})
16+
Base.precompile(Tuple{typeof(AcuteML.multiString),Int64})
17+
Base.precompile(Tuple{typeof(AcuteML.multiString),String})
18+
Base.precompile(Tuple{typeof(AcuteML.nodeparse),Type,Node})
19+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Any,1},Type{AbsNormal}})
20+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Float64,1},Type{AbsNormal}})
21+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Int64,1},Type{AbsNormal}})
22+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{String,1},Type{AbsNormal}})
23+
Base.precompile(Tuple{typeof(addnode!),Document,String,Node,Type{AbsNormal}})
24+
Base.precompile(Tuple{typeof(addnode!),Document,String,Nothing,Type{AbsAttribute}})
25+
Base.precompile(Tuple{typeof(addnode!),Document,String,String,Type{AbsNormal}})
26+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Any,1},Type{AbsNormal}})
27+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Float64,1},Type{AbsNormal}})
28+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Int64,1},Type{AbsNormal}})
29+
Base.precompile(Tuple{typeof(addnode!),Node,String,Int64,Type{AbsText}})
30+
Base.precompile(Tuple{typeof(addnode!),Node,String,Node,Type{AbsNormal}})
31+
Base.precompile(Tuple{typeof(addnode!),Node,String,Nothing,Type{AbsAttribute}})
32+
Base.precompile(Tuple{typeof(convert),Type{Union{Missing, Type}},Type{AbsAttribute}})
33+
Base.precompile(Tuple{typeof(convert),Type{Union{Missing, Type}},Type{AbsNormal}})
34+
Base.precompile(Tuple{typeof(convert),Type{Union{Missing, Type}},Type{AbsText}})
35+
Base.precompile(Tuple{typeof(createnode),Type{AbsEmpty},String})
36+
Base.precompile(Tuple{typeof(createnode),Type{AbsHtml},String})
37+
Base.precompile(Tuple{typeof(createnode),Type{AbsHtml}})
38+
Base.precompile(Tuple{typeof(createnode),Type{AbsXml}})
39+
Base.precompile(Tuple{typeof(findcontent),String,Document,Type{AbsNormal}})
40+
Base.precompile(Tuple{typeof(findcontent),String,Node,Type{AbsNormal}})
41+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Any,1}},String,Document,Type{AbsNormal}})
42+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Any,1}},String,Node,Type{AbsNormal}})
43+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Float64,1}},String,Document,Type{AbsNormal}})
44+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Float64,1}},String,Node,Type{AbsNormal}})
45+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Int64,1}},String,Document,Type{AbsNormal}})
46+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Int64,1}},String,Node,Type{AbsNormal}})
47+
Base.precompile(Tuple{typeof(findcontent),Type{Array{String,1}},String,Document,Type{AbsNormal}})
48+
Base.precompile(Tuple{typeof(findcontent),Type{Int64},String,Node,Type{AbsText}})
49+
Base.precompile(Tuple{typeof(findcontent),Type{Nothing},String,Document,Type{AbsAttribute}})
50+
Base.precompile(Tuple{typeof(findcontent),Type{Nothing},String,Node,Type{AbsAttribute}})
51+
Base.precompile(Tuple{typeof(findcontent),Type{String},String,Document,Type{AbsNormal}})
52+
Base.precompile(Tuple{typeof(findcontent),Type{Union{Nothing, String}},String,Document,Type{AbsAttribute}})
53+
Base.precompile(Tuple{typeof(findcontent),Type{Union{Nothing, String}},String,Node,Type{AbsAttribute}})
54+
Base.precompile(Tuple{typeof(newTemplate),String,Symbol})
55+
Base.precompile(Tuple{typeof(newTemplate),String})
56+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},Array{Node,1},Node,Type})
57+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},String,Document,Type{AbsNormal}})
58+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},String,Node,Type{AbsNormal}})
59+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},Array{Node,1},Node,Type})
60+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},String,Document,Type{AbsNormal}})
61+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},String,Node,Type{AbsNormal}})
62+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},Array{Node,1},Node,Type})
63+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},String,Document,Type{AbsNormal}})
64+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},String,Node,Type{AbsNormal}})
65+
Base.precompile(Tuple{typeof(updatecontent!),Array{String,1},String,Document,Type{AbsNormal}})
66+
Base.precompile(Tuple{typeof(updatecontent!),Array{String,1},String,Node,Type{AbsNormal}})
67+
Base.precompile(Tuple{typeof(updatecontent!),Int64,String,Node,Type{AbsText}})
68+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Document,Type{AbsAttribute}})
69+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Document,Type{AbsNormal}})
70+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsAttribute}})
71+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsNormal}})
72+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsText}})
73+
isdefined(AcuteML, Symbol("##5#6")) && Base.precompile(Tuple{getfield(AcuteML, Symbol("##5#6")),Symbol})
74+
end
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
function _precompile_()
2+
ccall(:jl_generating_output, Cint, ()) == 1 || return nothing
3+
Base.precompile(Tuple{Core.kwftype(typeof(AcuteML.render2file)),NamedTuple{(:id, :age, :field, :GPA, :courses),Tuple{Int64,Int64,String,Float64,Array{String,1}}},typeof(render2file),String,Bool})
4+
Base.precompile(Tuple{typeof(AcuteML.aml_create),Expr,Array{Union{Expr, Symbol},1},Array{Any,1},Array{Union{Expr, Symbol, Type},1},Array{Union{Expr, Symbol},1},Array{Union{Missing, String},1},Array{Union{Missing, Function, Symbol},1},Array{Union{Missing, Type},1},String,Type{T} where T,Array{Union{Missing, Function, Symbol},0},Bool,Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Expr})
5+
Base.precompile(Tuple{typeof(AcuteML.aml_create),Expr,Array{Union{Expr, Symbol},1},Array{Any,1},Array{Union{Expr, Symbol, Type},1},Array{Union{Expr, Symbol},1},Array{Union{Missing, String},1},Array{Union{Missing, Function, Symbol},1},Array{Union{Missing, Type},1},String,Type{T} where T,Array{Union{Missing, Function, Symbol},0},Bool,Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Array{Union{Nothing, Expr},1},Symbol})
6+
Base.precompile(Tuple{typeof(AcuteML.aml_parse),Expr})
7+
Base.precompile(Tuple{typeof(AcuteML.findfirsttext),Int64,Node})
8+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlcreator),Expr,Bool,Expr,Expr,String,Type{T} where T,Expr,QuoteNode,Expr})
9+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlcreator),Nothing,Bool,Expr,Expr,String,Type{T} where T,Expr,QuoteNode,Expr})
10+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmlextractor),Nothing,Bool,Expr,Expr,String,Type{T} where T,Expr,QuoteNode,Expr})
11+
Base.precompile(Tuple{typeof(AcuteML.get_arg_xmludpater),Nothing,Bool,Expr,Expr,String,Type{T} where T,Expr,QuoteNode,Expr})
12+
Base.precompile(Tuple{typeof(AcuteML.get_struct_xmlcreator),Expr,Array{Any,1},Array{Union{Expr, Symbol},1},Nothing,Expr,Array{Expr,1},Array{Expr,1},Nothing})
13+
Base.precompile(Tuple{typeof(AcuteML.get_struct_xmlextractor),Expr,Array{Any,1},Array{Expr,1},Nothing,Array{Expr,1},Nothing})
14+
Base.precompile(Tuple{typeof(AcuteML.multiString),Array{String,1}})
15+
Base.precompile(Tuple{typeof(AcuteML.multiString),Float64})
16+
Base.precompile(Tuple{typeof(AcuteML.multiString),Int64})
17+
Base.precompile(Tuple{typeof(AcuteML.multiString),String})
18+
Base.precompile(Tuple{typeof(AcuteML.nodeparse),Type{T} where T,Node})
19+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Any,1},Type{AbsNormal}})
20+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Float64,1},Type{AbsNormal}})
21+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{Int64,1},Type{AbsNormal}})
22+
Base.precompile(Tuple{typeof(addnode!),Document,String,Array{String,1},Type{AbsNormal}})
23+
Base.precompile(Tuple{typeof(addnode!),Document,String,Node,Type{AbsNormal}})
24+
Base.precompile(Tuple{typeof(addnode!),Document,String,Nothing,Type{AbsAttribute}})
25+
Base.precompile(Tuple{typeof(addnode!),Document,String,String,Type{AbsNormal}})
26+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Any,1},Type{AbsNormal}})
27+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Float64,1},Type{AbsNormal}})
28+
Base.precompile(Tuple{typeof(addnode!),Node,String,Array{Int64,1},Type{AbsNormal}})
29+
Base.precompile(Tuple{typeof(addnode!),Node,String,Int64,Type{AbsText}})
30+
Base.precompile(Tuple{typeof(addnode!),Node,String,Node,Type{AbsNormal}})
31+
Base.precompile(Tuple{typeof(addnode!),Node,String,Nothing,Type{AbsAttribute}})
32+
Base.precompile(Tuple{typeof(createnode),Type{AbsEmpty},String})
33+
Base.precompile(Tuple{typeof(createnode),Type{AbsHtml},String})
34+
Base.precompile(Tuple{typeof(createnode),Type{AbsHtml}})
35+
Base.precompile(Tuple{typeof(createnode),Type{AbsXml}})
36+
Base.precompile(Tuple{typeof(findcontent),String,Document,Type{AbsNormal}})
37+
Base.precompile(Tuple{typeof(findcontent),String,Node,Type{AbsNormal}})
38+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Any,1}},String,Document,Type{AbsNormal}})
39+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Any,1}},String,Node,Type{AbsNormal}})
40+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Float64,1}},String,Document,Type{AbsNormal}})
41+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Float64,1}},String,Node,Type{AbsNormal}})
42+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Int64,1}},String,Document,Type{AbsNormal}})
43+
Base.precompile(Tuple{typeof(findcontent),Type{Array{Int64,1}},String,Node,Type{AbsNormal}})
44+
Base.precompile(Tuple{typeof(findcontent),Type{Array{String,1}},String,Document,Type{AbsNormal}})
45+
Base.precompile(Tuple{typeof(findcontent),Type{Int64},String,Node,Type{AbsText}})
46+
Base.precompile(Tuple{typeof(findcontent),Type{Nothing},String,Document,Type{AbsAttribute}})
47+
Base.precompile(Tuple{typeof(findcontent),Type{Nothing},String,Node,Type{AbsAttribute}})
48+
Base.precompile(Tuple{typeof(findcontent),Type{String},String,Document,Type{AbsNormal}})
49+
Base.precompile(Tuple{typeof(findcontent),Type{Union{Nothing, String}},String,Document,Type{AbsAttribute}})
50+
Base.precompile(Tuple{typeof(findcontent),Type{Union{Nothing, String}},String,Node,Type{AbsAttribute}})
51+
Base.precompile(Tuple{typeof(newTemplate),String,Symbol})
52+
Base.precompile(Tuple{typeof(newTemplate),String})
53+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},Array{Node,1},Node,Type{T} where T})
54+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},String,Document,Type{AbsNormal}})
55+
Base.precompile(Tuple{typeof(updatecontent!),Array{Any,1},String,Node,Type{AbsNormal}})
56+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},Array{Node,1},Node,Type{T} where T})
57+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},String,Document,Type{AbsNormal}})
58+
Base.precompile(Tuple{typeof(updatecontent!),Array{Float64,1},String,Node,Type{AbsNormal}})
59+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},Array{Node,1},Node,Type{T} where T})
60+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},String,Document,Type{AbsNormal}})
61+
Base.precompile(Tuple{typeof(updatecontent!),Array{Int64,1},String,Node,Type{AbsNormal}})
62+
Base.precompile(Tuple{typeof(updatecontent!),Array{String,1},String,Document,Type{AbsNormal}})
63+
Base.precompile(Tuple{typeof(updatecontent!),Array{String,1},String,Node,Type{AbsNormal}})
64+
Base.precompile(Tuple{typeof(updatecontent!),Int64,String,Node,Type{AbsText}})
65+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Document,Type{AbsAttribute}})
66+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Document,Type{AbsNormal}})
67+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsAttribute}})
68+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsNormal}})
69+
Base.precompile(Tuple{typeof(updatecontent!),String,String,Node,Type{AbsText}})
70+
isdefined(AcuteML, Symbol("#5#6")) && Base.precompile(Tuple{getfield(AcuteML, Symbol("#5#6")),Symbol})
71+
end

0 commit comments

Comments
 (0)