@@ -140,22 +140,17 @@ jobs:
140140 - ./vendor/bundle
141141 key : v1-bundle-<< parameters.ruby_version >>-{{ .Branch }}-{{ checksum "tiny_tds.gemspec" }}
142142
143- - restore_cache :
144- name : restore cross-compiled gems
145- keys :
146- - gems-<< pipeline.git.revision >>
143+ - attach_workspace :
144+ at : artifacts
147145
148146 - run :
149- name : restore cross-compiled code from gem
147+ name : install native gem and restore cross-compiled code from gem
150148 command : |
151149 $Env:PATH = "C:\\Ruby<< parameters.ruby_version >>-x64\\bin;$Env:PATH"
152150 $rubyArchitecture = (ruby -e 'puts RUBY_PLATFORM').Trim()
153151 $gemVersion = (Get-Content VERSION).Trim()
154152
155- # Install appropriate gem
156- # The project on Windows is checked out at C:/Users/circleci.PACKER-633B1A5A/project
157- # However, since the cache with the gems was created on Linux, it uses a different path
158- gem install --local --install-dir=./tmp "C:\home\circleci\project\gems\tiny_tds-$gemVersion-$rubyArchitecture.gem"
153+ gem install --local --install-dir=./tmp "artifacts/gems/tiny_tds-$gemVersion-$rubyArchitecture.gem"
159154
160155 # Restore precompiled code
161156 $source = (Resolve-Path ".\tmp\gems\tiny_tds-$gemVersion-$rubyArchitecture\lib\tiny_tds").Path
@@ -243,23 +238,23 @@ jobs:
243238 - run :
244239 name : Move gems into separate directory before caching
245240 command : |
246- mkdir gems
247- mv pkg/*.gem gems
241+ mkdir -p artifacts/ gems
242+ mv pkg/*.gem artifacts/ gems
248243
249244 - store_artifacts :
250- path : gems
245+ path : artifacts/ gems
251246
252247 - save_cache :
253248 name : save ports cache
254249 paths :
255250 - ./ports
256251 key : ports-{{ checksum ".ports_versions" }}
257252
258- - save_cache :
259- name : save gems into cache
253+ - persist_to_workspace :
254+ name : save gems into workspace
255+ root : artifacts
260256 paths :
261- - ./gems
262- key : gems-<< pipeline.git.revision >>
257+ - gems
263258
264259workflows :
265260 test_supported_ruby_versions :
0 commit comments