Skip to content

Commit

Permalink
Use ports mechanism for Linux tests
Browse files Browse the repository at this point in the history
  • Loading branch information
andyundso committed Sep 25, 2023
1 parent 37b4572 commit fb5b456
Showing 1 changed file with 23 additions and 11 deletions.
34 changes: 23 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,30 +39,42 @@ jobs:
docker exec cimg_ruby bash -c './test/bin/setup_tinytds_db.sh'
- run:
name: compile openssl library
name: bundle install gems
command: |
docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-openssl.sh'
docker exec cimg_ruby bash -c 'bundle install'
- run:
name: compile freetds library
name: Write used versions into file
command: |
docker exec cimg_ruby bash -c 'sudo -E ./test/bin/install-freetds.sh'
docker exec cimg_ruby bash -c 'bundle exec rake ports:version_file'
- restore_cache:
name: restore ports cache
keys:
- ports-<< parameters.ruby_version >>-{{ checksum ".ports_versions" }}
- ports-<< parameters.ruby_version >>-

- run:
name: bundle install gems
name: compile ports and build gem
command: |
docker exec cimg_ruby bash -c 'bundle install'
docker exec cimg_ruby bash -c 'bundle exec rake ports && bundle exec rake build'
- run:
name: build gem
name: Fix permissions on ports directory
command: |
docker exec cimg_ruby bash -c 'bundle exec rake build'
docker exec cimg_ruby bash -c 'sudo chown -R $(id -u):$(id -g) ports'
- run:
name: test gem
command: |
docker exec cimg_ruby bash -c 'bundle exec rake test'
- save_cache:
name: save ports cache
paths:
- ./ports
key: ports-<< parameters.ruby_version >>-{{ checksum ".ports_versions" }}

- store_test_results:
path: test/reports

Expand Down Expand Up @@ -221,8 +233,8 @@ jobs:
- restore_cache:
name: restore ports cache
keys:
- ports-{{ checksum ".ports_versions" }}
- ports-
- ports-win-{{ checksum ".ports_versions" }}
- ports-win-

- run:
name: Build gem
Expand All @@ -242,7 +254,7 @@ jobs:
name: save ports cache
paths:
- ./ports
key: ports-{{ checksum ".ports_versions" }}
key: ports-win-{{ checksum ".ports_versions" }}

- persist_to_workspace:
name: save gems into workspace
Expand Down

0 comments on commit fb5b456

Please sign in to comment.