Skip to content

Commit 5f0c333

Browse files
committed
ci: separate job for testing source gem
because the way it was set up in the native gem job matrix, the linux native test was getting clobbered by the source test config.
1 parent 05af54a commit 5f0c333

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

.github/workflows/ci.yml

+43-11
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,21 @@ jobs:
6666
rm -rf tmp/build-cache
6767
mv tmp/build-cache-new tmp/build-cache
6868
69+
- name: Basic tests on the generated image
70+
env:
71+
TEST_PLATFORM: ${{ matrix.platform }}
72+
run: |
73+
bundle exec rake test
74+
6975
- name: Build rcd_test.gem
7076
run: |
7177
gem build rake-compiler-dock.gemspec
7278
gem install -l rake-compiler-dock-*.gem
7379
cd test/rcd_test/
74-
bundle install
80+
bundle install --local
7581
bundle exec rake clean clobber
7682
bundle exec rake gem:${PLATFORM}
7783
78-
- name: Basic tests on the generated image
79-
env:
80-
TEST_PLATFORM: ${{ matrix.platform }}
81-
run: |
82-
bundle exec rake test
83-
8484
- name: Upload binary gem
8585
uses: actions/upload-artifact@v3
8686
with:
@@ -95,7 +95,7 @@ jobs:
9595
path: test/rcd_test/pkg/*-?.?.?.gem
9696

9797
- if: contains(matrix.platform, 'x64-mingw')
98-
name: Build static rcd_test.gem
98+
name: Build static rcd_test.gem for windows
9999
env:
100100
RCD_TEST_CONFIG: "--link-static"
101101
run: |
@@ -107,12 +107,46 @@ jobs:
107107
bundle exec rake gem:${PLATFORM}
108108
109109
- if: contains(matrix.platform, 'x64-mingw')
110-
name: Upload static binary gem
110+
name: Upload static rcd_test.gem
111111
uses: actions/upload-artifact@v3
112112
with:
113113
name: gem-${{ matrix.platform }}-static
114114
path: test/rcd_test/pkg/*-*-*.gem
115115

116+
job_test_source:
117+
name: source gem
118+
needs: docker_build
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
os:
123+
- ubuntu
124+
ruby:
125+
- "3.2"
126+
- "3.1"
127+
- "3.0"
128+
- "2.7"
129+
- "2.6"
130+
- "2.5"
131+
- "2.4"
132+
runs-on: ${{ matrix.os }}-latest
133+
steps:
134+
- uses: actions/checkout@v3
135+
- uses: ruby/setup-ruby@v1
136+
with:
137+
ruby-version: ${{ matrix.ruby }}
138+
- name: Download gem-ruby
139+
uses: actions/download-artifact@v3
140+
with:
141+
name: gem-ruby
142+
- name: Install gem-ruby
143+
run: gem install --local *.gem --verbose
144+
- name: Run tests
145+
run: |
146+
cd test/rcd_test/
147+
bundle install
148+
ruby -rrcd_test -S rake test
149+
116150
job_test_native:
117151
name: native
118152
needs: docker_build
@@ -138,8 +172,6 @@ jobs:
138172
platform: x86_64-darwin
139173
- os: ubuntu
140174
platform: x86_64-linux
141-
- os: ubuntu
142-
platform: ruby
143175
- os: ubuntu
144176
ruby: jruby-head
145177
platform: jruby

0 commit comments

Comments
 (0)