Skip to content
Merged
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions .github/actions/setup-aws-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "AWS SDK setup"
description: "AWS SDK C++ build and installation"

inputs:
aws-sdk-version:
description: "AWS SDK C++ version tag"
required: false
default: "1.9.379"

runs:
using: "composite"
steps:
- name: Repo cache
uses: actions/cache@v4
id: repo-cache
with:
path: ~/aws-sdk-cpp
key: aws-sdk-cpp-${{ runner.os }}-${{ inputs.aws-sdk-version }}

- name: Setup repo
if: steps.repo-cache.outputs.cache-hit != 'true'
shell: bash
env:
AWS_SDK_VERSION: ${{ inputs.aws-sdk-version }}
run: |
cd ~
git clone --branch "$AWS_SDK_VERSION" --depth 1 --recurse-submodules https://github.com/aws/aws-sdk-cpp.git
cd aws-sdk-cpp
curl -fsSL https://github.com/aws/aws-sdk-cpp/commit/0fba9f908d7ddc30aceab69b939f997330a44bb3.patch | git apply
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_ONLY="s3;transfer" -DBUILD_SHARED_LIBS=OFF -DMINIMIZE_SIZE=ON -DCMAKE_INSTALL_PREFIX="/usr"

- name: Build and install
shell: bash
run: |
cd ~/aws-sdk-cpp/build
sudo cmake --build . --target install
8 changes: 8 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ description: "Shared setup steps for the workflows"
runs:
using: "composite"
steps:
- name: Install deps
shell: bash
run: |
sudo apt-get update
sudo apt install -y gcc g++ cmake curl libssl-dev libldap2-dev libkrb5-dev \
libcurl4-openssl-dev libsasl2-dev liblz4-dev libbz2-dev \
libsnappy-dev zlib1g-dev libzlcore-dev liblzma-dev e2fslibs-dev

- name: Set up Python
uses: actions/setup-python@v5
id: setup-python
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ jobs:
- name: Setup environment
uses: ./.github/actions/setup-env

- name: Setup AWS SDK
uses: ./.github/actions/setup-aws-sdk

- name: Bazel cache
uses: actions/cache@v4
id: bazel_cache
Expand All @@ -67,7 +70,8 @@ jobs:
run: |
{
echo 'common --config=local'
echo 'common --build_enterprise=false'
echo 'build --build_enterprise=false'
echo 'build --//bazel/config:compiler_type=clang'
} > .bazelrc.compiledb
bazel \
--bazelrc=.bazelrc.compiledb \
Expand All @@ -86,7 +90,7 @@ jobs:

- name: Upload SARIF results
if: always()
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: clang-tidy-results.sarif
category: clang-tidy
10 changes: 2 additions & 8 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup environment
uses: ./.github/actions/setup-env

- name: Get changed files
id: changed
uses: tj-actions/changed-files@v45

- name: List changed files
run: |
echo "Changed files: ${{ steps.changed.outputs.all_changed_files }}"

- name: Run bazel format
run: |
# The --include_autogenerated_targets=True is needed to create the autogenerated targets.
Expand Down
9 changes: 8 additions & 1 deletion bazel/wrapper_hook/wrapper_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

wrapper_debug(f"wrapper hook script is using {sys.executable}")

# Append new_args before the '--' separator if it exists
def append_args(args, new_args):
if "--" in args:
separator_index = args.index("--")
return args[:separator_index] + new_args + args[separator_index:]
else:
return args + new_args

def main():
install_modules(sys.argv[1])
Expand All @@ -36,7 +43,7 @@ def main():
print(
f"{enterprise_mod.relative_to(REPO_ROOT).as_posix()} missing, defaulting to local non-enterprise build (--config=local --build_enterprise=False). Add the directory to not automatically add these options."
)
args += ["--build_enterprise=False", "--config=local"]
args = append_args(args, ["--config=local", "--build_enterprise=False"])

write_workstation_bazelrc(args)

Expand Down