Skip to content

Commit 3b26a18

Browse files
committed
Build as --native, test compiler and some specs
1 parent be6e850 commit 3b26a18

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

.github/workflows/ci.yml

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- run: jt spotbugs
3030

3131
build:
32-
name: build
32+
name: build jvm
3333
runs-on: ubuntu-20.04
3434
defaults:
3535
run:
@@ -67,6 +67,45 @@ jobs:
6767
name: truffleruby-jvm
6868
path: build/mxbuild/truffleruby-jvm.tar
6969

70+
build_native:
71+
name: build native
72+
runs-on: ubuntu-20.04
73+
defaults:
74+
run:
75+
# Ensure all build files are in build/.
76+
# Test jobs don't have build/ to ensure nothing uses the build files.
77+
working-directory: build
78+
steps:
79+
- name: Clone TruffleRuby
80+
uses: actions/checkout@v2
81+
with:
82+
path: build
83+
- name: Setup system Ruby
84+
uses: ruby/setup-ruby@v1
85+
with:
86+
working-directory: build
87+
- name: Setup jt
88+
run: echo "$PWD/bin" >> $GITHUB_PATH
89+
90+
- name: Restore ~/.mx/cache
91+
uses: actions/cache@v2
92+
with:
93+
path: ~/.mx/cache
94+
key: mx-cache-build-native-${{ runner.os }}-${{ hashFiles('build/common.json') }}
95+
96+
- uses: ./build/.github/actions/setup-jvmci-graal
97+
98+
- name: Build TruffleRuby
99+
run: jt build --env native
100+
101+
- name: Create archive
102+
run: tar cf truffleruby-native.tar truffleruby-native
103+
working-directory: build/mxbuild
104+
- uses: actions/upload-artifact@v2
105+
with:
106+
name: truffleruby-native
107+
path: build/mxbuild/truffleruby-native.tar
108+
70109
fast_specs:
71110
name: fast specs
72111
needs: [build]
@@ -111,7 +150,33 @@ jobs:
111150
name: truffleruby-jvm
112151
- uses: ./.github/actions/setup-truffleruby
113152

114-
- run: jt test specs --timeout 180 ${{ matrix.specs }}
153+
- run: jt test --timeout 180 ${{ matrix.specs }}
154+
155+
test_native:
156+
name: test native
157+
needs: [build_native]
158+
runs-on: ubuntu-20.04
159+
steps:
160+
- name: Clone TruffleRuby
161+
uses: actions/checkout@v2
162+
- name: Setup system Ruby
163+
uses: ruby/setup-ruby@v1
164+
- name: Setup jt
165+
run: echo "SYSTEM_RUBY=$(which ruby)" >> $GITHUB_ENV && echo "$PWD/bin" >> $GITHUB_PATH
166+
167+
- uses: actions/download-artifact@v2
168+
with:
169+
name: truffleruby-native
170+
- uses: ./.github/actions/setup-truffleruby
171+
with:
172+
archive: truffleruby-native
173+
174+
- run: jt test compiler
175+
# A subset of specs that are more likely to differ on native and run quickly
176+
- run: jt test :command_line
177+
- run: jt test :language
178+
# To catch slow :truffle specs which only apply to native
179+
- run: jt test fast :truffle
115180

116181
ruby_spec_cruby:
117182
name: ruby/spec on CRuby ${{ matrix.ruby }}

0 commit comments

Comments
 (0)