Skip to content

toolchain: update include directories in aarch64 #434

toolchain: update include directories in aarch64

toolchain: update include directories in aarch64 #434

Workflow file for this run

# yamllint disable rule:line-length
---
name: Bazel
on: # yamllint disable-line rule:truthy
pull_request:
branches: ['*']
jobs:
test:
runs-on: ubuntu-latest
container:
image: dtors/base-cpp:latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Configure Git Safe Directory
run: |
git config --global --add safe.directory $(pwd)
- name: Find affected files
id: affected_files
run: |
git fetch origin ${{ github.base_ref }} --depth=1
git diff --diff-filter=ACM --name-only origin/${{ github.base_ref }} > affected_files.txt
echo "Affected files:"
cat affected_files.txt
- name: Find affected Bazel targets
id: bazel_targets
run: |
> affected_targets.txt
while read file; do
if [[ "$file" == *.c || "$file" == *.cc || "$file" == *.cpp || "$file" == *.cxx || "$file" == *.h || "$file" == *.hpp || "$file" == *.hxx ]]; then
echo "Finding targets for: $file"
targets=$(bazelisk query --output=package "$file" || true)/...
echo "$targets" >> affected_targets.txt
fi
done < affected_files.txt
sort -u affected_targets.txt -o affected_targets.txt
echo "Affected targets:"
cat affected_targets.txt
echo "targets=$(cat affected_targets.txt | tr '\n' ' ')" >> $GITHUB_ENV
shell: bash
- name: Setup bazel cache
if: env.targets != ''
uses: actions/cache@v4
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-development
- name: Test affected targets
if: env.targets != ''
run: |
echo "Building targets: $targets"
bazelisk test ${targets}
- name: No targets to test
if: env.targets == ''
run: echo "No affected Bazel targets found. Skipping test."