Skip to content

Commit

Permalink
ci: use smaller machines for docker tests (#1301)
Browse files Browse the repository at this point in the history
* ci: use smaller machines for docker tests

* fix default sccache size param

* more cache for cargo-shuttle
  • Loading branch information
jonaro00 authored Oct 5, 2023
1 parent 6ffc717 commit 629a63c
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ executors:
machine:
image: ubuntu-2204:2023.07.2
docker_layer_caching: true
resource_class: xlarge
resource_class: large

# sscache steps are from this guide
# https://medium.com/@edouard.oger/rust-caching-on-circleci-using-sccache-c996344f0115
Expand Down Expand Up @@ -238,7 +238,7 @@ jobs:
type: string
sccache-size:
type: string
default: ""
default: 500M
executor: docker-rust
resource_class: << parameters.resource_class >>
steps:
Expand Down Expand Up @@ -269,11 +269,15 @@ jobs:
crate:
description: "Crate in workspace to test"
type: string
resource_class:
description: The resource type to use for the machine
type: string
sccache-size:
type: string
default: ""
default: 500M
# Using a machine image since tests will start a docker container
executor: machine-ubuntu
resource_class: << parameters.resource_class >>
steps:
- install-rust
- install-protoc
Expand All @@ -296,6 +300,7 @@ jobs:
- save-sccache
e2e-test:
executor: machine-ubuntu
resource_class: medium
steps:
- install-rust
- checkout
Expand Down Expand Up @@ -737,14 +742,24 @@ workflows:
- test-workspace-member-with-integration-docker:
name: << matrix.crate >> with docker
matrix:
alias: test-workspace-member-with-integration-docker-medium
parameters:
sccache-size:
- 1G
resource_class:
- medium
crate:
# need to spawn docker containers, therefore in a machine
- cargo-shuttle
- shuttle-provisioner
- shuttle-logger
- test-workspace-member-with-integration-docker:
name: << matrix.crate >> with docker
matrix:
alias: test-workspace-member-with-integration-docker-large
parameters:
resource_class:
- large
sccache-size:
- 750M
crate:
- cargo-shuttle
- e2e-test:
requires:
- test-standalone
Expand All @@ -753,7 +768,8 @@ workflows:
- test-workspace-member-with-integration-medium
- test-workspace-member-with-integration-large
- test-workspace-member-with-integration-xlarge
- test-workspace-member-with-integration-docker
- test-workspace-member-with-integration-docker-medium
- test-workspace-member-with-integration-docker-large
filters:
branches:
only: production
Expand Down

0 comments on commit 629a63c

Please sign in to comment.