forked from JuliaRegistries/General
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (90 loc) · 3.71 KB
/
automerge.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
name: AutoMerge
on:
schedule:
# The cron job is just a fallback.
# The "stopwatch" functionality that we have implemented should
# ensure that an AutoMerge merge job is run at least every 8 minutes.
# Therefore, it's sufficient for us to run the fallback job infrequently.
# We will choose to run the fallback job every 4 hours.
- cron: '0 */4 * * *'
pull_request:
workflow_dispatch:
# Disable PkgServer to avoid random issues.
# TODO: remove this when PkgServer feels better
env:
JULIA_PKG_SERVER: ""
jobs:
AutoMerge:
timeout-minutes: 60
if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '^1.6.0-0' # TODO: remove this line once 1.6 is released
# - '1.6' # TODO: uncomment this line once 1.6 is released
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@af513c7a016048ae468971c52ed77d9562c7c819 # v1.0.0
- uses: julia-actions/setup-julia@0b9b1d2cd24245f151902702d8e73b3f6b910014 # v1.6.0
with:
version: ${{ matrix.version }}
- name: Cache artifacts
uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/.ci/Manifest.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- name: Install dependencies by running Pkg.instantiate()
run: julia --project=.ci/ -e 'using Pkg; Pkg.instantiate()'
- name: AutoMerge.run
env:
MERGE_NEW_PACKAGES: true
MERGE_NEW_VERSIONS: true
AUTOMERGE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTOMERGE_TAGBOT_TOKEN: ${{ secrets.TAGBOT_TOKEN }}
JULIA_DEBUG: RegistryCI,AutoMerge
run: |
using RegistryCI
using Dates
RegistryCI.AutoMerge.run(
merge_new_packages = ENV["MERGE_NEW_PACKAGES"] == "true",
merge_new_versions = ENV["MERGE_NEW_VERSIONS"] == "true",
new_package_waiting_period = Day(3),
new_jll_package_waiting_period = Minute(20),
new_version_waiting_period = Minute(10),
new_jll_version_waiting_period = Minute(10),
registry = "JuliaRegistries/General",
tagbot_enabled = true,
authorized_authors = String["JuliaRegistrator"],
authorized_authors_special_jll_exceptions = String["jlbuild"],
suggest_onepointzero = false,
additional_statuses = String[],
additional_check_runs = String[],
)
shell: julia --color=yes --project=.ci/ {0}
AutoMerge-stopwatch:
timeout-minutes: 60
if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name
environment: stopwatch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@af513c7a016048ae468971c52ed77d9562c7c819 # v1.0.0
- uses: julia-actions/setup-julia@0b9b1d2cd24245f151902702d8e73b3f6b910014 # v1.6.0
with:
version: '^1.6.0-0' # TODO: remove this line once 1.6 is released
# version: '1.6' # TODO: uncomment this line once 1.6 is released
- run: julia --project=.ci/ -e 'using Pkg; Pkg.instantiate()'
- run: julia --project=.ci/ -e 'using Pkg; Pkg.precompile()'
- run: julia --project=.ci/ .ci/stopwatch.jl
env:
AUTOMERGE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTOMERGE_TAGBOT_TOKEN: ${{ secrets.TAGBOT_TOKEN }}