CodeCommitsIssuesPull requestsActionsInsightsSecurity
d4eb358752a2890a7d8d10b15872182228f19e05

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

ci/check-syntax.sh

20lines · modepreview

#!/usr/bin/env bash
set -e -x

source default-config

./install-os-packages.sh jq

[[ -d "${WORKSPACE}/sources" ]] || die "Run get-sources.sh first"

mkdir -p "${WORKSPACE}/build"
pushd "${WORKSPACE}/build"

cmake -DCMAKE_BUILD_TYPE=Debug $CMAKE_FLAGS ../sources

make -j $THREADS re2_st # Generated headers

jq --raw-output '.[] | .command' compile_commands.json | grep -v -P -- '-c .+/contrib/' | sed -r -e 's/-o\s+\S+/-fsyntax-only/' > syntax-commands
xargs --arg-file=syntax-commands --max-procs=$THREADS --replace /bin/sh -c "{}"

popd