66 rubocop :
77 name : Lint (Rubocop)
88 runs-on : ubuntu-20.04
9- container : ruby:2.6
9+ container : ruby:2.7
1010 steps :
1111 - name : Checkout
1212 uses : actions/checkout@v2
3030 outputs :
3131 GEM_VERSION : ${{ steps.set-metadata.outputs.GEM_VERSION }}
3232 runs-on : ubuntu-20.04
33- container : ruby:2.6
33+ container : ruby:2.7
3434 steps :
35+ - name : Update Rubygems and Bundler
36+ run : |
37+ gem update --system 3.3.26
38+ gem install bundler -v '~> 2.3.26'
3539 - name : Checkout
3640 uses : actions/checkout@v2
3741 - name : Bundle
@@ -118,6 +122,14 @@ jobs:
118122 - name : Inject V8
119123 run : |
120124 ./libexec/inject-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
125+ - name : Test V8 in C++
126+ if : matrix.platform != 'arm64'
127+ run : |
128+ cd test/gtest
129+ cmake -S . -B build
130+ cd build
131+ cmake --build .
132+ ./c_v8_tests
121133 - name : Build binary gem
122134 run : |
123135 bundle exec rake binary
@@ -191,10 +203,10 @@ jobs:
191203 run : |
192204 case ${{ matrix.libc }} in
193205 gnu)
194- echo 'ruby:2.6 '
206+ echo 'ruby:2.7 '
195207 ;;
196208 musl)
197- echo 'ruby:2.6 -alpine'
209+ echo 'ruby:2.7 -alpine'
198210 ;;
199211 esac | tee container_image
200212 echo "::set-output name=image::$(cat container_image)"
@@ -203,12 +215,20 @@ jobs:
203215 echo "::set-output name=id::$(cat container_id)"
204216 - name : Install Alpine system dependencies
205217 if : ${{ matrix.libc == 'musl' }}
206- run : docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apk add --no-cache build-base linux-headers bash python3 git curl tar
218+ run : docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apk add --no-cache build-base linux-headers bash python3 git curl tar cmake
219+ - name : Install Debian system dependencies
220+ if : ${{ matrix.libc == 'gnu' }}
221+ run : |
222+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apt-get update
223+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apt-get install -y cmake
207224 - name : Install Debian cross-compiler
208225 if : ${{ matrix.libc == 'gnu' && matrix.platform != 'amd64' }}
209226 run : |
210- docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apt-get update
211227 docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apt-get install -y binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
228+ - name : Update Rubygems and Bundler
229+ run : |
230+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} gem update --system 3.3.26
231+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} gem install bundler -v '~> 2.3.26'
212232 - name : Checkout
213233 uses : actions/checkout@v2
214234 - name : Bundle
@@ -245,6 +265,10 @@ jobs:
245265 - name : Inject V8
246266 run : |
247267 docker exec -w "${PWD}" ${{ steps.container.outputs.id }} ./libexec/inject-libv8 ${{ steps.set-metadata.outputs.NODE_VERSION }}
268+ - name : Test V8 in C++
269+ if : matrix.platform != 'arm64'
270+ run : |
271+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bash -c "cd test/gtest && cmake -S . -B build && cd build && cmake --build . && ctest"
248272 - name : Build binary gem
249273 run : |
250274 docker exec -w "${PWD}" ${{ steps.container.outputs.id }} bundle exec rake binary[${{ steps.platform.outputs.ruby_target_platform }}]
@@ -266,12 +290,6 @@ jobs:
266290 - amd64
267291 # other platforms would need emulation, which is way too slow
268292 container :
269- - image : ruby:2.6
270- version : ' 2.6'
271- libc : gnu
272- - image : ruby:2.6-alpine
273- version : ' 2.6'
274- libc : musl
275293 - image : ruby:2.7
276294 version : ' 2.7'
277295 libc : gnu
@@ -298,6 +316,10 @@ jobs:
298316 - name : Install Alpine system dependencies
299317 if : ${{ matrix.container.libc == 'musl' }}
300318 run : apk add --no-cache build-base linux-headers bash python3 git curl tar
319+ - name : Update Rubygems and Bundler
320+ run : |
321+ gem update --system 3.3.26
322+ gem install bundler -v '~> 2.3.26'
301323 - name : Set metadata
302324 id : set-metadata
303325 run : |
@@ -312,6 +334,7 @@ jobs:
312334 run : gem install --verbose pkg/libv8-node-${{ needs.build-ruby.outputs.GEM_VERSION }}.gem
313335 - name : Test with mini_racer
314336 run : |
337+ export BUNDLE_FORCE_RUBY_PLATFORM=y
315338 git clone https://github.com/rubyjs/mini_racer.git test/mini_racer --depth 1
316339 cd test/mini_racer
317340 git fetch origin refs/pull/261/head
@@ -364,7 +387,6 @@ jobs:
364387 fail-fast : false
365388 matrix :
366389 version :
367- - ' 2.6'
368390 - ' 2.7'
369391 - ' 3.0'
370392 - ' 3.1'
@@ -378,9 +400,6 @@ jobs:
378400 - gnu
379401 - musl
380402 include :
381- - version : ' 2.6'
382- platform : ' arm64'
383- libc : ' gnu'
384403 - version : ' 2.7'
385404 platform : ' arm64'
386405 libc : ' gnu'
@@ -418,6 +437,10 @@ jobs:
418437 - name : Install Alpine system dependencies
419438 if : ${{ matrix.libc == 'musl' }}
420439 run : docker exec -w "${PWD}" ${{ steps.container.outputs.id }} apk add --no-cache build-base git libstdc++
440+ - name : Update Rubygems and Bundler
441+ run : |
442+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} gem update --system 3.3.26
443+ docker exec -w "${PWD}" ${{ steps.container.outputs.id }} gem install bundler -v '~> 2.3.26'
421444 - name : Set metadata
422445 id : set-metadata
423446 run : |
0 commit comments