ci: fix pipefail killing lint step before grep check, uncomment artifact upload
- Add '|| true' to SQFVM pipeline so pipefail doesn't kill the step before we can grep for [ERR] lines - Uncomment lint log artifact upload step - description.ext false positive filtered by grep -v
This commit is contained in:
@@ -31,23 +31,24 @@ jobs:
|
|||||||
while IFS= read -r -d '' f; do
|
while IFS= read -r -d '' f; do
|
||||||
ARGS+=(-i "$f")
|
ARGS+=(-i "$f")
|
||||||
done < <(find "$SRC" -name "*.sqf" -print0)
|
done < <(find "$SRC" -name "*.sqf" -print0)
|
||||||
|
# pipefail would kill this step on SQFVM's non-zero exit before we can check the log
|
||||||
/tmp/sqfvm/sqfvm_linux_x64_gcc/sqfvm \
|
/tmp/sqfvm/sqfvm_linux_x64_gcc/sqfvm \
|
||||||
-a --parse-only --no-execute-print \
|
-a --parse-only --no-execute-print \
|
||||||
--input-config "$SRC/description.ext" \
|
--input-config "$SRC/description.ext" \
|
||||||
"${ARGS[@]}" 2>&1 | tee lint_output.log
|
"${ARGS[@]}" 2>&1 | tee lint_output.log || true
|
||||||
# Filter known false positive: SQFVM config parser chokes on & in author string
|
# Filter known false positive: SQFVM config parser chokes on & in author string
|
||||||
if grep -v "description.ext" lint_output.log | grep -q "^\[ERR\]"; then
|
if grep -v "description.ext" lint_output.log | grep -q "^\[ERR\]"; then
|
||||||
echo "::error::SQFVM found syntax errors"
|
echo "::error::SQFVM found syntax errors"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# - name: Upload lint log
|
- name: Upload lint log
|
||||||
# if: always()
|
if: always()
|
||||||
# uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
# with:
|
with:
|
||||||
# name: sqfvm-lint.log
|
name: sqfvm-lint.log
|
||||||
# path: lint_output.log
|
path: lint_output.log
|
||||||
# if-no-files-found: warn
|
if-no-files-found: warn
|
||||||
|
|
||||||
pack:
|
pack:
|
||||||
needs: [lint]
|
needs: [lint]
|
||||||
|
|||||||
Reference in New Issue
Block a user