toolchain: update include directories in aarch64 #285
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yamllint disable rule:line-length | |
--- | |
name: Lint | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
branches: ['*'] | |
jobs: | |
bazel: | |
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 | |
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 files | |
run: | | |
> affected_bazel_files.txt | |
while read file; do | |
if [[ "$file" == *BUILD || "$file" == *WORKSPACE || "$file" == *MODULE.bazel || "$file" == *.bazelrc ]]; then | |
echo "$file" >> affected_bazel_files.txt | |
fi | |
done < affected_files.txt | |
sort -u affected_bazel_files.txt -o affected_bazel_files.txt | |
echo "Affected Bazel files:" | |
cat affected_bazel_files.txt | |
echo "bazel_files=$(cat affected_bazel_files.txt | tr -s '\n' ' ' | sed 's/^[ \t]*//;s/[ \t]*$//')" >> $GITHUB_ENV | |
shell: bash | |
- name: Setup bazel cache | |
if: env.bazel_files != '' | |
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: Run Buildifier on affected files | |
if: env.bazel_files != '' | |
run: |- | |
echo "Running buildifier check on: $bazel_files" | |
bazelisk run //bazel:buildifier_check -- $bazel_files | |
shell: bash | |
- name: No Bazel files affected | |
if: env.bazel_files == '' | |
run: echo "No affected Bazel files found. Skipping buildifier." | |
- name: Fail message | |
if: failure() | |
run: |- | |
echo -e "For applying automatic fixes run: | |
bazel run //bazel:buildifier" |