Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,17 @@ commands:
- attach_workspace:
at: *workspace_location

# Install python as the bazel image is used instead of python image.
install_bazel:
description: Install https://bazel.build/
steps:
- run:
name: install latest bazel
# https://bazel.build/install/ubuntu
command: |
apt-get update
apt-get install --yes bazel
apt-get update && apt-get full-upgrade

install_python:
description: Install Python
steps:
Expand All @@ -38,7 +48,6 @@ commands:

python3.8 -m venv .venv

# Install rust tools.
install_rust:
description: Install Rust
steps:
Expand Down Expand Up @@ -77,16 +86,15 @@ executors:
resource_class:
type: string
default: medium
# Use docker so there is no need to sudo every command
docker:
- image: l.gcr.io/google/bazel:latest
resource_class: << parameters.resource_class >>
- image: ubuntu:18.04
resource_class: medium
working_directory: ~/xlab

jobs:
setup:
machine:
image: ubuntu-2004:current
resource_class: medium
executor: default-executor

steps:
- checkout
Expand All @@ -108,12 +116,11 @@ jobs:
- ./bazel_repository_cache

bazel_build_and_test:
machine:
image: ubuntu-2004:current
resource_class: medium
executor: default-executor

steps:
- custom_attach_workspace
- install_bazel
- install_python
- install_rust
- init_environment
Expand Down