Skip to content

Unbreak manual rustfmt invocations via Bazel #1716

Unbreak manual rustfmt invocations via Bazel

Unbreak manual rustfmt invocations via Bazel #1716

Workflow file for this run

name: CI
# Controls when the workflow will run.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
docker-compose-compiles-nativelink:
# The type of runner that the job will run on.
runs-on: ubuntu-22.04
strategy:
matrix:
# Which OS versions we will test on.
os_version: [ 20.04, 22.04 ]
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
file: ./deployment-examples/docker-compose/Dockerfile
build-args: |
OPT_LEVEL=opt
OS_VERSION=${{ matrix.os_version }}
ADDITIONAL_SETUP_WORKER_CMD=DEBIAN_FRONTEND=noninteractive apt-get install -y gcc g++ lld pkg-config python3
load: true # This brings the build into `docker images` from buildx.
tags: trace_machina/nativelink:latest
- uses: docker/build-push-action@v4
with:
context: .
file: ./deployment-examples/docker-compose/Dockerfile
build-args: |
OPT_LEVEL=opt
OS_VERSION=${{ matrix.os_version }}
load: true # This brings the build into `docker images` from buildx.
tags: trace_machina/nativelink:builder
target: builder
- name: Compile Native Link with Native Link
run: |
mkdir -p ~/.cache && \
cd deployment-examples/docker-compose && \
docker-compose up -d && \
cd ../../ && \
docker run --rm --net=host -w /root/nativelink -v $PWD:/root/nativelink trace_machina/nativelink:builder sh -c ' \
bazel clean && \
bazel test //... \
--remote_instance_name=main \
--remote_cache=grpc://127.0.0.1:50051 \
--remote_executor=grpc://127.0.0.1:50052 \
--remote_default_exec_properties=cpu_count=1 \
' && \
docker run --rm --net=host -w /root/nativelink -v $PWD:/root/nativelink trace_machina/nativelink:builder sh -c ' \
bazel clean && \
bazel test //... \
--remote_instance_name=main \
--remote_cache=grpc://127.0.0.1:50051 \
--remote_executor=grpc://127.0.0.1:50052 \
--remote_default_exec_properties=cpu_count=1 \
' 2>&1 | ( ! grep ' PASSED in ' ) # If we get PASSED without (cache) it means there's a cache issue.
integration-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
# Which OS versions we will test on.
os_version: [ 20.04, 22.04 ]
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .
file: ./deployment-examples/docker-compose/Dockerfile
build-args: |
OPT_LEVEL=fastbuild
OS_VERSION=${{ matrix.os_version }}
load: true # This brings the build into `docker images` from buildx.
tags: trace_machina/nativelink:latest
- name: Run tests
run: ./run_integration_tests.sh