-
-
Notifications
You must be signed in to change notification settings - Fork 4
97 lines (83 loc) · 2.77 KB
/
SnoopCompile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: SnoopCompile
on:
push:
branches:
- 'master'
defaults:
run:
shell: bash
jobs:
SnoopCompile:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: # NOTE: if not using `yml_path`, these should match the version in `BotConfig`
- 'nightly'
- '1.7.0-beta3'
- '1.6.2'
- '1.5.3'
- '1.4.2'
- '1.3.1'
- '1.2.0'
os: # NOTE: if not using `yml_path`, these should match the os in `BotConfig`
- ubuntu-latest
- windows-latest
- macos-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v2
env:
cache-name: cache-julia-SnoopCompile
with:
path: |
~/.julia
!~/.julia/compiled
key: ${{ runner.os }}-${{ matrix.version }}-${{ env.cache-name }}
- name: Install dependencies
run: |
julia --project -e 'using Pkg; Pkg.instantiate();'
julia -e 'using Pkg; Pkg.add( PackageSpec(name="CompileBot", version = "1") );
Pkg.develop(PackageSpec(; path=pwd()));
using CompileBot; CompileBot.addtestdep();'
- name: Generating precompile files
run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' # NOTE: notice the path
- name: Running Benchmark
run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' # NOTE: optional, if have benchmark file
- name: Upload all
continue-on-error: true
uses: actions/[email protected]
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: CompileBot postprocess
run: julia -e 'using Pkg; Pkg.add( PackageSpec(name="CompileBot", rev = "master") );
using CompileBot; CompileBot.postprocess();'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update precompile_*.jl file
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