|
1 | 1 | name: SnoopCompile
|
2 | 2 |
|
| 3 | + |
| 4 | +# Edit based on your repository. |
3 | 5 | on:
|
4 |
| - - push |
| 6 | + push: |
| 7 | + branches: |
| 8 | + # - 'master' |
5 | 9 |
|
| 10 | +defaults: |
| 11 | + run: |
| 12 | + shell: bash |
6 | 13 |
|
7 | 14 | jobs:
|
8 |
| - build: |
| 15 | + SnoopCompile: |
| 16 | + if: "!contains(github.event.head_commit.message, '[skip ci]')" |
9 | 17 | runs-on: ${{ matrix.os }}
|
10 | 18 | strategy:
|
| 19 | + fail-fast: false |
11 | 20 | matrix:
|
12 |
| - julia-version: ['nightly'] |
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 | + - '1.0.5' |
| 27 | + os: |
| 28 | + - ubuntu-latest |
| 29 | + - windows-latest |
| 30 | + - macos-latest |
| 31 | + arch: |
| 32 | + - x64 |
15 | 33 | steps:
|
16 | 34 | - uses: actions/checkout@v2
|
17 | 35 | - uses: julia-actions/setup-julia@latest
|
18 | 36 | with:
|
19 |
| - version: ${{ matrix.julia-version }} |
| 37 | + version: ${{ matrix.version }} |
20 | 38 | - 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()' |
| 39 | + run: | |
| 40 | + julia --project -e 'using Pkg; Pkg.instantiate();' |
| 41 | + julia -e 'using Pkg; Pkg.add(PackageSpec(url = "https://github.com/timholy/SnoopCompile.jl", rev = "master")); Pkg.develop(PackageSpec(; path=pwd())); using SnoopCompile; SnoopCompile.addtestdep();' |
26 | 42 | - name: Generating precompile files
|
27 |
| - run: julia --project=@. -e 'include("deps/SnoopCompile/snoopCompile.jl")' |
| 43 | + run: julia --project -e 'include("deps/SnoopCompile/snoop_bot.jl")' |
28 | 44 | - name: Running Benchmark
|
29 |
| - run: julia --project=@. -e 'include("deps/SnoopCompile/snoopBenchmark.jl")' |
| 45 | + run: julia --project -e 'include("deps/SnoopCompile/snoop_bench.jl")' |
| 46 | + - name: Upload all |
| 47 | + uses: actions/upload-artifact@v2 |
| 48 | + with: |
| 49 | + path: ./ |
30 | 50 |
|
31 |
| - # https://github.com/marketplace/actions/create-pull-request |
| 51 | + Create_PR: |
| 52 | + if: "!contains(github.event.head_commit.message, '[skip ci]')" |
| 53 | + needs: SnoopCompile |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v2 |
| 57 | + - name: Download all |
| 58 | + uses: actions/download-artifact@v2 |
| 59 | + - name: Move the content of the directory to the root |
| 60 | + run: | |
| 61 | + rsync -a artifact/* ./ |
| 62 | + rm -d -r artifact |
| 63 | + - name: Discard unrelated changes |
| 64 | + run: | |
| 65 | + test -f 'Project.toml' && git checkout -- 'Project.toml' |
| 66 | + git ls-files 'Manifest.toml' | grep . && git checkout -- 'Manifest.toml' |
| 67 | + (git diff -w --no-color || git apply --cached --ignore-whitespace && git checkout -- . && git reset && git add -p) || echo done |
| 68 | + - name: Format precompile_includer.jl |
| 69 | + run: julia -e 'using Pkg; Pkg.add("JuliaFormatter"); using JuliaFormatter; format_file("src/precompile_includer.jl")' |
32 | 70 | - name: Create Pull Request
|
33 | 71 | uses: peter-evans/create-pull-request@v2
|
34 | 72 | with:
|
35 | 73 | token: ${{ secrets.GITHUB_TOKEN }}
|
36 | 74 | commit-message: Update precompile_*.jl file
|
37 | 75 | committer: Amin Yahyaabadi <[email protected]>
|
38 |
| - title: '[AUTO] Update precompile_*.jl file' |
| 76 | + title: "[AUTO] Update precompiles" |
39 | 77 | labels: SnoopCompile
|
40 |
| - branch: create-pull-request/SnoopCompile |
41 |
| - - name: Check output environment variable |
42 |
| - run: echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}" |
| 78 | + branch: "SnoopCompile_AutoPR" |
| 79 | + |
| 80 | + |
| 81 | + Skip: |
| 82 | + if: "contains(github.event.head_commit.message, '[skip ci]')" |
| 83 | + runs-on: ubuntu-latest |
| 84 | + steps: |
| 85 | + - name: Skip CI 🚫 |
| 86 | + run: echo skip ci |
0 commit comments