-
Notifications
You must be signed in to change notification settings - Fork 71
156 lines (149 loc) · 8.54 KB
/
pr-binding-refs.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# This workflow is used to figure out binding pull requests related with
# the given MMTk core pull request.
#
# To make sure that our maintained bindings always work with the latest MMTk core,
# we may run binding tests for a core PR. By default, we run with the master of
# each binding repo in our mmtk organisation. However, if the core PR has changes
# that requires bindings to update, we can no longer run with the master of the binding repos.
# In such a case, we need to specify the binding PRs so our mmtk-core CI knows how to run the
# correct version of the bindings for the tests.
#
# In the cases that we need to update bindings, we expect the core PR to have a comment like the following
# to specify the binding pull requests. Note if any of the following values are omitted, the default values
# will be used (run with the master in mmtk's binding repos).
# Repo is in the format of user/repo. Ref could be sha or branch name.
# ```
# binding-refs
# OPENJDK_BINDING_REPO=xx/xx
# OPENJDK_BINDING_REF=xxxxxx
# JIKESRVM_BINDING_REPO=xx/xx
# JIKESRVM_BINDING_REF=xxxxxx
# V8_BINDING_REPO=xx/xx
# V8_BINDING_REF=xxxxxx
# JULIA_BINDING_REPO=xx/xx
# JULIA_BINDING_REF=xxxxxx
# RUBY_BINDING_REPO=xx/xx
# RUBY_BINDING_REF=xxxxxx
# ```
name: Fetch Binding PR Info
on:
workflow_call:
inputs:
pull_request:
type: string
required: true
outputs:
openjdk_binding_repo:
description: "The repository of OpenJDK binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.openjdk_binding_repo}}
openjdk_binding_repo_default:
description: "The default repository of OpenJDK binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.openjdk_binding_repo_default }}
openjdk_binding_ref:
description: "The git ref of OpenJDK binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.openjdk_binding_ref}}
openjdk_binding_ref_default:
description: "The default git ref of OpenJDK binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.openjdk_binding_ref_default }}
jikesrvm_binding_repo:
description: "The repository of JikesRVM binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.jikesrvm_binding_repo}}
jikesrvm_binding_repo_default:
description: "The default repository of JikesRVM binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.jikesrvm_binding_repo_default }}
jikesrvm_binding_ref:
description: "The git ref of JikesRVM binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.jikesrvm_binding_ref}}
jikesrvm_binding_ref_default:
description: "The default git ref of JikesRVM binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.jikesrvm_binding_ref_default }}
v8_binding_repo:
description: "The repository of V8 binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.v8_binding_repo}}
v8_binding_repo_default:
description: "The default repository of V8 binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.v8_binding_repo_default }}
v8_binding_ref:
description: "The git ref of V8 binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.v8_binding_ref}}
v8_binding_ref_default:
description: "The default git ref of V8 binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.v8_binding_ref_default }}
julia_binding_repo:
description: "The repository of Julia binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.julia_binding_repo}}
julia_binding_repo_default:
description: "The default repository of Julia binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.julia_binding_repo_default }}
julia_binding_ref:
description: "The git ref of Julia binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.julia_binding_ref}}
julia_binding_ref_default:
description: "The default git ref of Julia binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.julia_binding_ref_default }}
ruby_binding_repo:
description: "The repository of Ruby binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.ruby_binding_repo}}
ruby_binding_repo_default:
description: "The default repository of Ruby binding, such as {user}/{repo}"
value: ${{ jobs.binding-refs.outputs.ruby_binding_repo_default }}
ruby_binding_ref:
description: "The git ref of Ruby binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.ruby_binding_ref}}
ruby_binding_ref_default:
description: "The default git ref of Ruby binding, such as sha and branch name"
value: ${{ jobs.binding-refs.outputs.ruby_binding_ref_default }}
jobs:
binding-refs:
runs-on: ubuntu-latest
env:
OPENJDK_BINDING_REPO_DEFAULT: mmtk/mmtk-openjdk
OPENJDK_BINDING_REF_DEFAULT: master
JIKESRVM_BINDING_REPO_DEFAULT: mmtk/mmtk-jikesrvm
JIKESRVM_BINDING_REF_DEFAULT: master
V8_BINDING_REPO_DEFAULT: mmtk/mmtk-v8
V8_BINDING_REF_DEFAULT: master
JULIA_BINDING_REPO_DEFAULT: mmtk/mmtk-julia
JULIA_BINDING_REF_DEFAULT: dev
RUBY_BINDING_REPO_DEFAULT: mmtk/mmtk-ruby
RUBY_BINDING_REF_DEFAULT: master
outputs:
openjdk_binding_repo: ${{ steps.print.outputs.openjdk_binding_repo }}
openjdk_binding_repo_default: ${{ env.OPENJDK_BINDING_REPO_DEFAULT }}
openjdk_binding_ref: ${{ steps.print.outputs.openjdk_binding_ref }}
openjdk_binding_ref_default: ${{ env.OPENJDK_BINDING_REF_DEFAULT }}
jikesrvm_binding_repo: ${{ steps.print.outputs.jikesrvm_binding_repo }}
jikesrvm_binding_repo_default: ${{ env.JIKESRVM_BINDING_REPO_DEFAULT }}
jikesrvm_binding_ref: ${{ steps.print.outputs.jikesrvm_binding_ref }}
jikesrvm_binding_ref_default: ${{ env.JIKESRVM_BINDING_REF_DEFAULT }}
v8_binding_repo: ${{ steps.print.outputs.v8_binding_repo }}
v8_binding_repo_default: ${{ env.V8_BINDING_REPO_DEFAULT }}
v8_binding_ref: ${{ steps.print.outputs.v8_binding_ref }}
v8_binding_ref_default: ${{ env.V8_BINDING_REF_DEFAULT }}
julia_binding_repo: ${{ steps.print.outputs.julia_binding_repo }}
julia_binding_repo_default: ${{ env.JULIA_BINDING_REPO_DEFAULT }}
julia_binding_ref: ${{ steps.print.outputs.julia_binding_ref }}
julia_binding_ref_default: ${{ env.JULIA_BINDING_REF_DEFAULT }}
ruby_binding_repo: ${{ steps.print.outputs.ruby_binding_repo }}
ruby_binding_repo_default: ${{ env.RUBY_BINDING_REPO_DEFAULT }}
ruby_binding_ref: ${{ steps.print.outputs.ruby_binding_ref }}
ruby_binding_ref_default: ${{ env.RUBY_BINDING_REF_DEFAULT }}
steps:
- name: Check binding revisions
uses: qinsoon/comment-env-vars@1.1.0
with:
pull_request: ${{ inputs.pull_request }}
token: ${{ secrets.GITHUB_TOKEN }}
default_env: 'OPENJDK_BINDING_REPO=${{ env.OPENJDK_BINDING_REPO_DEFAULT }},OPENJDK_BINDING_REF=${{ env.OPENJDK_BINDING_REF_DEFAULT }},JIKESRVM_BINDING_REPO=${{ env.JIKESRVM_BINDING_REPO_DEFAULT }},JIKESRVM_BINDING_REF=${{ env.JIKESRVM_BINDING_REF_DEFAULT }},V8_BINDING_REPO=${{ env.V8_BINDING_REPO_DEFAULT }},V8_BINDING_REF=${{ env.V8_BINDING_REF_DEFAULT }},JULIA_BINDING_REPO=${{ env.JULIA_BINDING_REPO_DEFAULT }},JULIA_BINDING_REF=${{ env.JULIA_BINDING_REF_DEFAULT }},RUBY_BINDING_REPO=${{ env.RUBY_BINDING_REPO_DEFAULT }},RUBY_BINDING_REF=${{ env.RUBY_BINDING_REF_DEFAULT }}'
- id: print
run: |
echo "openjdk_binding_repo=${{ env.OPENJDK_BINDING_REPO }}" >> $GITHUB_OUTPUT
echo "openjdk_binding_ref=${{ env.OPENJDK_BINDING_REF }}" >> $GITHUB_OUTPUT
echo "jikesrvm_binding_repo=${{ env.JIKESRVM_BINDING_REPO }}" >> $GITHUB_OUTPUT
echo "jikesrvm_binding_ref=${{ env.JIKESRVM_BINDING_REF }}" >> $GITHUB_OUTPUT
echo "v8_binding_repo=${{ env.V8_BINDING_REPO }}" >> $GITHUB_OUTPUT
echo "v8_binding_ref=${{ env.V8_BINDING_REF }}" >> $GITHUB_OUTPUT
echo "julia_binding_repo=${{ env.JULIA_BINDING_REPO }}" >> $GITHUB_OUTPUT
echo "julia_binding_ref=${{ env.JULIA_BINDING_REF }}" >> $GITHUB_OUTPUT
echo "ruby_binding_repo=${{ env.RUBY_BINDING_REPO }}" >> $GITHUB_OUTPUT
echo "ruby_binding_ref=${{ env.RUBY_BINDING_REF }}" >> $GITHUB_OUTPUT