Skip to content

Commit 75d2265

Browse files
committed
Use ports mechanism for Linux tests
1 parent c16e05d commit 75d2265

File tree

1 file changed

+23
-11
lines changed

1 file changed

+23
-11
lines changed

.circleci/config.yml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,42 @@ jobs:
3939
docker exec cimg_ruby bash -c './test/bin/setup_tinytds_db.sh'
4040
4141
- run:
42-
name: compile openssl library
42+
name: bundle install gems
4343
command: |
44-
docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-openssl.sh'
44+
docker exec cimg_ruby bash -c 'bundle install'
4545
4646
- run:
47-
name: compile freetds library
47+
name: Write used versions into file
4848
command: |
49-
docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-freetds.sh'
49+
docker exec cimg_ruby bash -c 'bundle exec rake ports:version_file'
50+
51+
- restore_cache:
52+
name: restore ports cache
53+
keys:
54+
- ports-<< parameters.ruby_version >>-{{ checksum ".ports_versions" }}
55+
- ports-<< parameters.ruby_version >>-
5056

5157
- run:
52-
name: bundle install gems
58+
name: compile ports and build gem
5359
command: |
54-
docker exec cimg_ruby bash -c 'bundle install'
60+
docker exec cimg_ruby bash -c 'bundle exec rake ports && bundle exec rake build'
5561
5662
- run:
57-
name: build gem
63+
name: Fix permissions on ports directory
5864
command: |
59-
docker exec cimg_ruby bash -c 'bundle exec rake build'
65+
docker exec cimg_ruby bash -c 'sudo chown -R $(id -u):$(id -g) ports'
6066
6167
- run:
6268
name: test gem
6369
command: |
6470
docker exec cimg_ruby bash -c 'bundle exec rake test'
6571
72+
- save_cache:
73+
name: save ports cache
74+
paths:
75+
- ./ports
76+
key: ports-<< parameters.ruby_version >>-{{ checksum ".ports_versions" }}
77+
6678
- store_test_results:
6779
path: test/reports
6880

@@ -221,8 +233,8 @@ jobs:
221233
- restore_cache:
222234
name: restore ports cache
223235
keys:
224-
- ports-{{ checksum ".ports_versions" }}
225-
- ports-
236+
- ports-win-{{ checksum ".ports_versions" }}
237+
- ports-win-
226238

227239
- run:
228240
name: Build gem
@@ -242,7 +254,7 @@ jobs:
242254
name: save ports cache
243255
paths:
244256
- ./ports
245-
key: ports-{{ checksum ".ports_versions" }}
257+
key: ports-win-{{ checksum ".ports_versions" }}
246258

247259
- persist_to_workspace:
248260
name: save gems into workspace

0 commit comments

Comments
 (0)