|
29 | 29 | - run: jt spotbugs
|
30 | 30 |
|
31 | 31 | build:
|
32 |
| - name: build |
| 32 | + name: build jvm |
33 | 33 | runs-on: ubuntu-20.04
|
34 | 34 | defaults:
|
35 | 35 | run:
|
|
67 | 67 | name: truffleruby-jvm
|
68 | 68 | path: build/mxbuild/truffleruby-jvm.tar
|
69 | 69 |
|
| 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 | + |
70 | 109 | fast_specs:
|
71 | 110 | name: fast specs
|
72 | 111 | needs: [build]
|
@@ -111,7 +150,33 @@ jobs:
|
111 | 150 | name: truffleruby-jvm
|
112 | 151 | - uses: ./.github/actions/setup-truffleruby
|
113 | 152 |
|
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 |
115 | 180 |
|
116 | 181 | ruby_spec_cruby:
|
117 | 182 | name: ruby/spec on CRuby ${{ matrix.ruby }}
|
|
0 commit comments