Skip to content
Closed
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
25 changes: 2 additions & 23 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,5 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Install dependencies
run: |
apt-get update && apt-get install -y clang-format
pip install reuse black

- name: Check Licenses
if: success() || failure()
shell: bash
run: |
reuse download --all
reuse lint

- name: Format Python
if: success() || failure()
run: |
black --diff .
black --check .

- name: Format C++
if: success() || failure()
run: |
python scripts/clang-format-wrapper.py --diff
python scripts/clang-format-wrapper.py --check
- name: Lint
uses: ./.github/actions/lint
22 changes: 16 additions & 6 deletions .github/workflows/update-mlir-aie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ permissions:
jobs:
check-and-update:
runs-on: ubuntu-latest
outputs:
new_branch: ${{ steps.create_pr.outputs.branch_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -44,13 +46,15 @@ jobs:
echo "tag=$latest_tag" >> $GITHUB_OUTPUT

- name: Compare versions and create PR
id: create_pr
if: steps.current_version.outputs.version != steps.latest_release.outputs.tag
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "New version found: ${{ steps.latest_release.outputs.tag_with_v }}. Current version is v${{ steps.current_version.outputs.version }}."

new_branch="update-mlir-aie-to-${{ steps.latest_release.outputs.tag_with_v }}"
echo "branch_name=$new_branch" >> $GITHUB_OUTPUT

# Check if branch already exists
if git ls-remote --exit-code origin "refs/heads/$new_branch"; then
Expand Down Expand Up @@ -84,12 +88,18 @@ jobs:
--title "Update mlir-aie from v${{ steps.current_version.outputs.version }} to ${{ steps.latest_release.outputs.tag_with_v }}" \
--body-file -

# Trigger CI workflows
echo "Triggering CI workflows..."
gh workflow run ci-lint.yml --ref $new_branch
gh workflow run small.yml --ref $new_branch
gh workflow run test-examples.yml --ref $new_branch

- name: No new version found
if: steps.current_version.outputs.version == steps.latest_release.outputs.tag
run: echo "mlir-aie is already at the latest version (${{ steps.current_version.outputs.version }})."

Linting:
needs: check-and-update
if: needs.check-and-update.outputs.new_branch != ''
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ needs.check-and-update.outputs.new_branch }}
- name: Lint
uses: ./.github/actions/lint
Loading