Skip to content

Dependency image refactor #338

Dependency image refactor

Dependency image refactor #338

Workflow file for this run

name: Run Linter
on:
pull_request:
concurrency:
group: linter-${{ github.ref }}
cancel-in-progress: true
jobs:
waitForDependencyImage:
name: Wait for dependency image
runs-on: ubuntu-latest
steps:
- name: Wait
uses: lewagon/[email protected]
with:
ref: ${{ github.ref }}
check-name: 'Build Docker Image Dependencies'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 3
linter:
name: Build And Run linter
needs: waitForDependencyImage
runs-on: ubuntu-latest
env:
PR_NUMBER: ${{ github.event.number }}
DOCKER_DEPENDENCY_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo-dependencies
container:
image: "${{ env.DOCKER_DEPENDENCY_IMAGE_NAME }}:commit-${{ github.sha }}"

Check failure on line 31 in .github/workflows/linter.yml

View workflow run for this annotation

GitHub Actions / Run Linter

Invalid workflow file

The workflow is not valid. .github/workflows/linter.yml (Line: 31, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DOCKER_DEPENDENCY_IMAGE_NAME
steps:
- uses: actions/checkout@v4
- shell: bash
name: Configure and run clang-tidy on changed files
run: |
mv /src/build .
cmake -DBUILD_WITH_CLANG_TIDY=on -D CMAKE_BUILD_TYPE=Debug -B build/Debug
echo "Successfully configured cmake"
files=""
PAGE=1
while true; do
page_files=$(curl -s \
"https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}/files?per_page=100&page=$PAGE" \
| jq -r '.[] | select(.status != "removed") | .filename')
# If there are no more files, break the loop
if [[ -z "$page_files" ]]; then
break
fi
files+="$page_files"$'\n'
PAGE=$((PAGE + 1))
done
echo "Changed files of this PR:"
echo "$files"
IFS=$'\n'
for file in $files; do
echo "Check ending for file: $file"
if [[ $file == *.cpp ]]; then
echo "Now linting the file: $file"
echo "cmake --build build/Debug --target ${file%.cpp}.o"
cmake --build build/Debug --target ${file%.cpp}.o
fi
done