Skip to content

[CIR] Implement support for __imag__ operator on complex rvalue #3085

[CIR] Implement support for __imag__ operator on complex rvalue

[CIR] Implement support for __imag__ operator on complex rvalue #3085

Workflow file for this run

name: "Check code formatting"
permissions:
contents: read
on:
pull_request:
branches:
- main
- 'users/**'
jobs:
code_formatter:
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
if: github.repository == 'llvm/clangir'
steps:
- name: Fetch LLVM sources
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout through merge base
uses: rmacklin/fetch-through-merge-base@v0
with:
base_ref: ${{ github.event.pull_request.base.ref }}
head_ref: ${{ github.event.pull_request.head.sha }}
deepen_length: 500
- name: Get changed files
id: changed-files
uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94
with:
separator: ","
skip_initial_fetch: true
base_sha: 'HEAD~1'
sha: 'HEAD'
# We need to pull the script from the main branch, so that we ensure
# we get the latest version of this script.
- name: Fetch code formatting utils
uses: actions/checkout@v4.2.2
with:
repository: ${{ github.repository }}
ref: ${{ github.base_ref }}
sparse-checkout: |
llvm/utils/git/requirements_formatting.txt
llvm/utils/git/code-format-helper.py
sparse-checkout-cone-mode: false
path: code-format-tools
- name: "Listed files"
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "Formatting files:"
echo "$CHANGED_FILES"
- name: Install clang-format
uses: aminya/setup-cpp@v1
with:
clangformat: 20.1.8
- name: Setup Python env
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'code-format-tools/llvm/utils/git/requirements_formatting.txt'
- name: Install python dependencies
run: pip install -r code-format-tools/llvm/utils/git/requirements_formatting.txt
- name: Run code formatter
env:
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
START_REV: ${{ github.event.pull_request.base.sha }}
END_REV: ${{ github.event.pull_request.head.sha }}
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
# Create an empty comments file so the pr-write job doesn't fail.
run: |
echo "[]" > comments &&
python ./code-format-tools/llvm/utils/git/code-format-helper.py \
--write-comment-to-file \
--token ${{ secrets.GITHUB_TOKEN }} \
--issue-number $GITHUB_PR_NUMBER \
--start-rev HEAD~1 \
--end-rev HEAD \
--changed-files "$CHANGED_FILES"
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
if: always()
with:
name: workflow-args
path: |
comments