Skip to content

Commit

Permalink
🔖 v0.6.3-rc2
Browse files Browse the repository at this point in the history
🔖 v0.6.3-rc2
  • Loading branch information
chinyi0523 authored Dec 26, 2023
2 parents 37158f5 + 4a4dc4a commit 3b6c19d
Show file tree
Hide file tree
Showing 48 changed files with 579 additions and 507 deletions.
3 changes: 2 additions & 1 deletion docker/clang-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM dvlab/qsyn-env:latest

RUN dnf install -y \
diffutils \
patch
patch \
parallel

COPY ./docker/test-entrypoint.sh /app/entrypoint.sh

Expand Down
3 changes: 2 additions & 1 deletion docker/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ FROM fedora:38 AS runner
RUN dnf install -y \
lapack \
openblas-serial \
libomp
libomp \
parallel

COPY --from=builder /app/build/qsyn /usr/local/bin/qsyn

Expand Down
3 changes: 2 additions & 1 deletion docker/gcc-test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ FROM dvlab/qsyn-env:latest

RUN dnf install -y \
diffutils \
patch
patch \
parallel

COPY ./docker/test-entrypoint.sh /app/entrypoint.sh

Expand Down
13 changes: 11 additions & 2 deletions scripts/LINT
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
#!/usr/bin/env bash

if [ ! -x "$(command -v parallel)" ]; then
echo "Error: GNU parallel is not installed!!"
exit 1
fi

format_one() {
clang-format -i "$1"
}
export -f format_one

lint_one() {
clang-tidy "$1" --quiet 2>&1 | grep -v "warnings generated" | grep -v "warning generated"
clang-tidy -p build "$1" --quiet 2>&1 | grep -v -E "warnings? generated"
}
export -f lint_one

FILES=$(find ./src -regex '.*\.[ch]pp' -type f)
CPPS=$(find ./src -regex '.*\.cpp' -type f)

# Format all files first to avoid linting errors
echo "Formatting files..."
parallel -j"$(nproc)" format_one ::: "$FILES"
echo "Generating compile commands..."
cmake -S . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=1 > /dev/null
echo "Linting files..."
parallel -j"$(nproc)" lint_one ::: "$FILES"
parallel -j"$(nproc)" lint_one ::: "$CPPS"
echo "Done"
Loading

0 comments on commit 3b6c19d

Please sign in to comment.