Skip to content

Commit

Permalink
Enable Rebase workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-singer authored and github-actions committed Sep 18, 2024
1 parent 65e0f4e commit 524caa2
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/nativelink-build-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build //src/... with nativelink
on:
push:
workflow_dispatch:
workflow_call:
workflow_run:
workflows: ["rebase upstream manual", "rebase upstream cron"]
types:
- completed
jobs:
linux-build:
runs-on: large-ubuntu-22.04
steps:
- name: Checkout
uses: >- # v4.1.1
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Bazelisk
uses: >- # v0.8.1
bazel-contrib/setup-bazel@b388b84bb637e50cdae241d0f255670d4bd79f29
- name: Build mongodb
run: |-
echo "--config=nativelink
# Remote execution / Cache settings
build:nativelink --remote_executor=scheduler-mongo-ci-dev.dev-usw2.nativelink.net:443
build:nativelink --remote_cache=cas-mongo-ci-dev.dev-usw2.nativelink.net:443
build:nativelink --remote_header=x-nativelink-api-key=$NATIVELINK_HEADER_RW_KEY
# TODO(adams): paramterize over this value after reverting the execution properties changes.
build:nativelink --remote_default_exec_properties="container-image=docker://ubuntu22:latest"
build:nativelink --remote_instance_name=main
build:nativelink --remote_download_minimal
build:nativelink --remote_timeout=600
# BES settings
build:nativelink --bes_backend=grpcs://bes-mongo-ci-dev.dev-usw2.nativelink.net
build:nativelink --bes_header=x-nativelink-api-key=$NATIVELINK_HEADER_RW_KEY
build:nativelink --bes_results_url=https://dev.nativelink.com/a/tracemachina/build
# Nativelink does not support, disabled for now.
build:nativelink --experimental_remote_cache_compression=false
# Number of bazel jobs to run
build:nativelink --jobs 500
# Debug logging settings
# build:nativelink --remote_grpc_log=/tmp/grpc.log
# build:nativelink --execution_log_json_file=/tmp/execution.log
# build:nativelink --build_event_json_file=/tmp/build_events.json
# build:nativelink --verbose_failures
# build:nativelink -s
# build:nativelink --platform_suffix=c2
build:nativelink --remote_print_execution_messages=all
" > .bazelrc.local
bazel build //src/... --config=nativelink
env:
NATIVELINK_HEADER_RW_KEY: ${{ secrets.NATIVELINK_HEADER_RW_KEY }}
56 changes: 56 additions & 0 deletions .github/workflows/nativelink-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build with nativelink
on:
push:
workflow_dispatch:
workflow_call:
workflow_run:
workflows: ["rebase upstream manual", "rebase upstream cron"]
types:
- completed
jobs:
linux-build:
runs-on: large-ubuntu-22.04
steps:
- name: Checkout
uses: >- # v4.1.1
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Setup Bazelisk
uses: >- # v0.8.1
bazel-contrib/setup-bazel@b388b84bb637e50cdae241d0f255670d4bd79f29
- name: Build mongodb
run: |-
echo "--config=nativelink
# Remote execution / Cache settings
build:nativelink --remote_executor=scheduler-mongo-ci-dev.dev-usw2.nativelink.net:443
build:nativelink --remote_cache=cas-mongo-ci-dev.dev-usw2.nativelink.net:443
build:nativelink --remote_header=x-nativelink-api-key=$NATIVELINK_HEADER_RW_KEY
# TODO(adams): paramterize over this value after reverting the execution properties changes.
build:nativelink --remote_default_exec_properties="container-image=docker://ubuntu22:latest"
build:nativelink --remote_instance_name=main
build:nativelink --remote_download_minimal
build:nativelink --remote_timeout=600
# BES settings
build:nativelink --bes_backend=grpcs://bes-mongo-ci-dev.dev-usw2.nativelink.net
build:nativelink --bes_header=x-nativelink-api-key=$NATIVELINK_HEADER_RW_KEY
build:nativelink --bes_results_url=https://dev.nativelink.com/a/tracemachina/build
# Nativelink does not support, disabled for now.
build:nativelink --experimental_remote_cache_compression=false
# Number of bazel jobs to run
build:nativelink --jobs 500
# Debug logging settings
# build:nativelink --remote_grpc_log=/tmp/grpc.log
# build:nativelink --execution_log_json_file=/tmp/execution.log
# build:nativelink --build_event_json_file=/tmp/build_events.json
# build:nativelink --verbose_failures
# build:nativelink -s
# build:nativelink --platform_suffix=a13
build:nativelink --remote_print_execution_messages=all
" > .bazelrc.local
bazel build //src/mongo:base --config=nativelink
env:
NATIVELINK_HEADER_RW_KEY: ${{ secrets.NATIVELINK_HEADER_RW_KEY }}
25 changes: 25 additions & 0 deletions .github/workflows/rebase-upstream-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: rebase upstream cron
on:
schedule:
# At every 30th minute.
- cron: '*/30 * * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Rebase
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git remote add upstream http://github.com/mongodb/mongo.git
git fetch upstream
git rebase upstream/master
- name: Push changes
uses: ad-m/github-push-action@master
with:
force_with_lease: true
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
22 changes: 22 additions & 0 deletions .github/workflows/rebase-upstream-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: rebase upstream manual
on: workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Rebase
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions"
git remote add upstream http://github.com/mongodb/mongo.git
git fetch upstream
git rebase upstream/master
- name: Push changes
uses: ad-m/github-push-action@master
with:
force_with_lease: true
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}

0 comments on commit 524caa2

Please sign in to comment.