Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
eb210b3
Test actual LRE in CI
palfrey May 11, 2026
7adfd1b
Merge branch 'main' into lre-in-ci
palfrey May 20, 2026
e39441f
Make there actually be a cache dir
palfrey May 20, 2026
4faa1b3
Fix LRE CI entrypoint
palfrey May 20, 2026
beee15d
Set LRE timeout small
palfrey May 20, 2026
989d1ec
Give full access to cache dir
palfrey May 20, 2026
da137fb
Dump logs synchronously
palfrey May 20, 2026
c04d02f
Reset source code changes for faster loops
palfrey May 20, 2026
57abf86
Fix executor entrypoint
palfrey May 20, 2026
64e3d6c
Wrong entrypoint for regular docker compose
palfrey May 20, 2026
f2bdad1
Merge branch 'main' into lre-in-ci
palfrey May 20, 2026
c57c9a9
Make worker user root so we can use namespaces
palfrey May 20, 2026
d3e1b9b
Split exec_triple for musl
palfrey May 21, 2026
395e4f6
Collapse nixExecToRustExec to musl not gnu
palfrey May 21, 2026
b563734
Default exec_triple to musl, not gnu
palfrey May 21, 2026
9c3bb00
More musl attempts
palfrey May 22, 2026
089dabb
Drop gnu from nixSystemToRustTargets
palfrey May 22, 2026
6347638
Merge branch 'lre-in-ci' of github.com:palfrey/nativelink into lre-in-ci
palfrey May 22, 2026
52517b7
Actually update lre-rs files
palfrey May 22, 2026
4e0bc88
Merge branch 'main' into lre-in-ci
palfrey Jun 1, 2026
811dc58
Revert "More musl attempts"
palfrey Jun 1, 2026
b013174
Upgrade aws-sdk-s3 and crc-fast
palfrey Jun 1, 2026
bce6243
Upgrade rules_rs to 0.0.82
palfrey Jun 1, 2026
c7e2bb0
Reset removing gnu configs
palfrey Jun 1, 2026
1f1c3e5
Merge branch 'main' into lre-in-ci
palfrey Jun 11, 2026
35c068a
rules_rs 0.0.86
palfrey Jun 11, 2026
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
262 changes: 54 additions & 208 deletions .github/workflows/lre.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,211 +58,57 @@ jobs:
with:
nativelink_attic_token: ${{ secrets.NATIVELINK_ATTIC_TOKEN }}

# remote:
# strategy:
# fail-fast: false
# matrix:
# os: [xlarge-ubuntu-24.04]
# toolchain: [lre-cc, lre-rs]
# name: Remote / ${{ matrix.toolchain }} / ${{ matrix.os }}
# runs-on: ${{ matrix.os }}
# timeout-minutes: 45
# steps:
# - name: Checkout
# uses: >- # v6.0.2
# actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

# - name: Prepare Worker
# uses: ./.github/actions/prepare-nix
# with:
# nativelink_attic_token: ${{ secrets.NATIVELINK_ATTIC_TOKEN }}

# - name: Start Kubernetes cluster
# run: >
# nix run .#native up

# - name: Start NativeLink operator
# env:
# REPO_URL: ${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}.git', github.repository) }}
# BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
# COMMIT: ${{ github.event.pull_request.head.sha || github.sha }}
# TOOLCHAIN: ${{ matrix.toolchain }}
# run: |
# nix develop --fallback --impure --command bash -c 'cat > kustomization.yaml << EOF
# apiVersion: kustomize.config.k8s.io/v1beta1
# kind: Kustomization
# resources:
# - kubernetes/resources/flux
# - kubernetes/resources/nativelink-core
# - kubernetes/resources/gateway-routes
# - kubernetes/workers/resources/worker-init
# - kubernetes/workers/resources/${TOOLCHAIN}
# patches:
# - patch: |-
# - op: replace
# path: /spec/url
# value: ${REPO_URL}
# - op: replace
# path: /spec/ref/branch
# value: ${BRANCH}
# - op: replace
# path: /spec/ref/commit
# value: ${COMMIT}
# target:
# kind: GitRepository
# name: nativelink-infra
# - patch: |-
# - op: replace
# path: /spec/postBuild/substitute/PLACEHOLDER_FLAKE_OUTPUT
# value: ./src_root#image
# target:
# kind: Kustomization
# name: nativelink-alert-core
# - patch: |-
# - op: replace
# path: /spec/postBuild/substitute/PLACEHOLDER_FLAKE_OUTPUT
# value: ./src_root#nativelink-worker-init
# target:
# kind: Kustomization
# name: nativelink-alert-worker-init
# - patch: |-
# - op: replace
# path: /spec/postBuild/substitute/PLACEHOLDER_FLAKE_OUTPUT
# value: ./src_root#nativelink-worker-${TOOLCHAIN}
# target:
# kind: Kustomization
# name: nativelink-alert-${TOOLCHAIN}
# EOF
# kubectl apply -k . &&
# rm kustomization.yaml'

# - name: Wait for Tekton resources
# run: >
# nix develop --impure --command
# bash -c "flux reconcile kustomization \
# --timeout=15m \
# nativelink-tekton-resources"

# - name: Wait for alerts
# env:
# TOOLCHAIN: ${{ matrix.toolchain }}
# run: >
# nix develop --impure --command
# bash -c "flux reconcile kustomization \
# --timeout=15m \
# nativelink-alert-core && \
# flux reconcile kustomization \
# --timeout=15m \
# nativelink-alert-worker-init && \
# flux reconcile kustomization \
# --timeout=15m \
# nativelink-alert-${TOOLCHAIN}"

# - name: Trigger pipelines
# env:
# REPO_URL: ${{ github.event.pull_request.head.repo.clone_url || format('https://github.com/{0}.git', github.repository) }}
# BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
# run: |
# nix develop --impure --command bash -c 'cat > nativelink-repo.yaml << EOF
# apiVersion: source.toolkit.fluxcd.io/v1
# kind: GitRepository
# metadata:
# name: nativelink
# namespace: default
# spec:
# interval: 2m
# url: ${REPO_URL}
# ref:
# branch: ${BRANCH}
# EOF
# kubectl apply -f nativelink-repo.yaml &&
# rm nativelink-repo.yaml'

# - name: Wait for Tekton pipelines
# run: >
# nix develop --impure --command bash << 'EOF'
# until pr=$(kubectl get pipelinerun -n ci -o name | \
# grep rebuild-nativelink-run-); do
# echo "Waiting for pipeline to be created..."
# sleep 1
# done

# echo "Found pipelinerun: $pr"
# kubectl wait --for=create -n ci $pr

# echo "Waiting for pipelinerun to succeed..."
# kubectl wait \
# --for=condition=Succeeded \
# --timeout=45m \
# pipelinerun \
# -n ci \
# -l tekton.dev/pipeline=rebuild-nativelink
# EOF

# - name: Wait for NativeLink Kustomization
# run: >
# nix develop --impure --command
# bash -c "flux reconcile kustomization -n default \
# --timeout=15m \
# nativelink-core"

# - name: Debug Kustomizations
# run: >
# nix develop --impure --command
# bash -c "kubectl get kustomizations.kustomize.toolkit.fluxcd.io -A && kubectl events --all-namespaces && kubectl describe kustomizations.kustomize.toolkit.fluxcd.io -A"
# if: always()

# - name: Wait for Worker Kustomization
# env:
# TOOLCHAIN: ${{ matrix.toolchain }}
# run: >
# nix develop --impure --command
# bash -c "flux reconcile kustomization -n default \
# --timeout=15m \
# nativelink-${TOOLCHAIN}"

# - name: Debug Kustomizations
# run: >
# nix develop --impure --command
# bash -c "kubectl get kustomizations.kustomize.toolkit.fluxcd.io -A && kubectl events --all-namespaces && kubectl describe kustomizations.kustomize.toolkit.fluxcd.io -A"
# if: always()

# - name: Wait for NativeLink
# run: >
# nix develop --impure --command
# bash -c "kubectl rollout status deploy/nativelink"

# - name: Wait for worker
# env:
# TOOLCHAIN: ${{ matrix.toolchain }}
# run: >
# nix develop --impure --command
# bash -c "kubectl rollout status deploy/nativelink-worker-${TOOLCHAIN}"

# - name: Get gateway IPs
# id: gateway-ips
# run: |
# echo "nativelink_ip=$(kubectl get gtw nativelink-gateway -o=jsonpath='{.status.addresses[0].value}')" >> "$GITHUB_ENV"

# - name: Print cluster state
# run: |
# kubectl get svc -A
# kubectl get pod -A
# kubectl get svc -A
# kubectl get deployments -A
# kubectl describe gtw
# echo "nativelink"
# kubectl logs -l app=nativelink
# echo "worker"
# kubectl logs -l app=nativelink-worker

# - name: Build example with ${{ matrix.toolchain }} toolchain
# env:
# TOOLCHAIN: ${{ matrix.toolchain }}
# run: >
# nix develop --impure --command
# bash -c "bazel run \
# --remote_cache=grpc://$nativelink_ip \
# --remote_executor=grpc://$nativelink_ip \
# --verbose_failures \
# @local-remote-execution//examples:${TOOLCHAIN}"
remote-docker-compose:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: >- # v6.0.2
actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

- name: Set up Docker Buildx
uses: >- # v3.9.0
docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca

- name: Prepare Worker
uses: ./.github/actions/prepare-nix
with:
nativelink_attic_token: ${{ secrets.NATIVELINK_ATTIC_TOKEN }}

- name: Build Nativelink images
run: |
nix run .#image.copyTo docker-daemon:local-nativelink:latest
nix run .#nativelink-worker-lre-rs.copyTo docker-daemon:local-worker-rs:latest
nix run .#nativelink-worker-init.copyTo docker-daemon:local-worker-init:latest

- name: Compile NativeLink with NativeLink
timeout-minutes: 5 # FIXME: Reset to 60 before merge

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXME

run: |
set -eu
mkdir .cache
ls -l .cache
chmod 777 .cache
ls -l .cache
cd deployment-examples/docker-compose
(docker compose -f docker-compose-lre.yml up 2>&1 | tee -i docker-compose.log) &
cd ../../
nix develop --impure --fallback --command \
bash -c "bazel test //... \
--lockfile_mode=error \
--verbose_failures \
--config self_test --config self_execute"
env:
NATIVELINK_IMAGE: local-nativelink:latest
NATIVELINK_WORKER_INIT_IMAGE: local-worker-init:latest
NATIVELINK_LRE_IMAGE: local-worker-rs:latest
NATIVELINK_DIR: ${{ github.workspace }}/.cache
RUST_LOG: debug

- name: Check Docker compose
run: cat deployment-examples/docker-compose/docker-compose.log
if: always()

- name: Teardown Worker
uses: ./.github/actions/end-nix
if: always()
with:
nativelink_attic_token: ${{ secrets.NATIVELINK_ATTIC_TOKEN }}
66 changes: 0 additions & 66 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,72 +20,6 @@ concurrency:
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
# TODO(palfrey): Flaky. Fix.
# docker-compose-compiles-nativelink:
# # The type of runner that the job will run on.
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# # Which OS versions we will test on.
# os_version: [ 24.04 ]
# steps:
# - name: Checkout
# uses: >- # v6.0.2
# actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd

# - name: Set up Docker Buildx
# uses: >- # v3.9.0
# docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca

# - name: Build Nativelink image
# uses: >- # v6.13.0
# docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
# with:
# context: .
# file: ./deployment-examples/docker-compose/Dockerfile
# build-args: |
# OPT_LEVEL=opt
# OS_VERSION=${{ matrix.os_version }}
# ADDITIONAL_SETUP_WORKER_CMD=apt-get update && 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

# - name: Build builder image
# uses: >- # v6.13.0
# docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991
# 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 NativeLink with NativeLink
# run: |
# mkdir -p ~/.cache && \
# cd deployment-examples/docker-compose && \
# (docker-compose up -d || 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 //... \
# --extra_toolchains=@rust_toolchains//:all \
# --remote_cache=grpc://127.0.0.1:50051 \
# --remote_executor=grpc://127.0.0.1:50052 \
# --remote_default_exec_properties=cpu_count=2 \
# ' && \
# docker run --rm --net=host -w /root/nativelink -v $PWD:/root/nativelink trace_machina/nativelink:builder sh -c ' \
# bazel clean && \
# bazel test //... \
# --extra_toolchains=@rust_toolchains//:all \
# --remote_cache=grpc://127.0.0.1:50051 \
# --remote_executor=grpc://127.0.0.1:50052 \
# --remote_default_exec_properties=cpu_count=2 \
# ' 2>&1 | ( ! grep ' PASSED in ' ) # If we get PASSED without (cache) it means there's a cache issue.

integration-tests:
runs-on: ubuntu-24.04
timeout-minutes: 60
Expand Down
Loading
Loading