Skip to content

Update ci process

Update ci process #90

Workflow file for this run

name: Akida compatibility check
on:
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # ensure full history so diffs against main work
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install akida cnn2snn
- name: Fetch main branch
run: |
git fetch origin main
- name: Find added *_i8_* files
id: find_files
run: |
FILES=$(git diff --diff-filter=A --name-only origin/main...HEAD | grep "_i8_" || true)
if [ -z "$FILES" ]; then
COUNT=0
echo "No i8 files found"
FILES_CSV=""
else
COUNT=$(echo "$FILES" | wc -l | tr -d ' ')
echo "Found $COUNT i8 file(s):"
echo "$FILES"
# join newline-separated paths with commas for git-lfs include
FILES_CSV=$(echo "$FILES" | paste -sd, -)
fi
echo "count=$COUNT" >> $GITHUB_OUTPUT
echo "files<<EOF" >> $GITHUB_OUTPUT
echo "$FILES" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "files_csv=$FILES_CSV" >> $GITHUB_OUTPUT
- name: Run model checks
if: ${{ steps.find_files.outputs.count != '0' }}
run: |
FILES="${{ steps.find_files.outputs.files }}"
python CI/post_filter.py -- CI/check_model.py --models $FILES