forked from ruby/prism
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 2.02 KB
/
truffleruby-bindings.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
name: TruffleRuby bindings
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: '0 13 * * *'
jobs:
# Inspired from https://github.com/oracle/truffleruby/blob/master/.github/workflows/ci.yml
test-loader:
if: github.repository == 'ruby/prism'
runs-on: ubuntu-20.04 # to be consistent with that workflow and test on older platform
steps:
- name: Clone prism
uses: actions/checkout@v4
with:
path: prism
- name: Setup system Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby
bundler-cache: true
working-directory: prism
- run: mkdir truffleruby-ws
- name: Clone TruffleRuby
uses: actions/checkout@v4
with:
repository: oracle/truffleruby
path: truffleruby-ws/truffleruby
- name: Setup jt
run: echo "$PWD/truffleruby-ws/truffleruby/bin" >> $GITHUB_PATH
- name: Restore ~/.mx/cache
uses: actions/cache@v4
with:
path: ~/.mx/cache
key: mx-cache-${{ runner.os }}
- name: Import latest prism in TruffleRuby
run: tool/import-prism.sh
working-directory: truffleruby-ws/truffleruby
- name: Get graal commit
id: graal_commit
run: echo "graal_commit=$(jt truffle_version)" >> $GITHUB_OUTPUT
- name: Clone Graal
uses: actions/checkout@v4
with:
repository: oracle/graal
path: truffleruby-ws/graal
ref: ${{ steps.graal_commit.outputs.graal_commit }}
- name: Install JVMCI
run: jt install jvmci
- name: Set JAVA_HOME
run: echo "JAVA_HOME=$(jt install jvmci)" >> $GITHUB_ENV
- name: Build TruffleRuby
run: jt build
working-directory: truffleruby-ws/truffleruby
- name: Parse test/prism/fixtures/**/*.rb
run: jt ruby -e 'Dir.glob("test/prism/fixtures/**/*.txt") { |file| puts file; puts Truffle::Debug.parse_ast(File.read(file)) }'
working-directory: prism
- name: Execute p 1+2
run: jt ruby -e 'p 1+2'