Attempt to use CodeQL #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | ||
on: [ push ] | ||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'cpp' ] | ||
target_arch: [ amd64, aarch64 ] | ||
include: | ||
- target_arch: amd64 | ||
target: amd64 | ||
- target_arch: aarch64 | ||
target: arm64 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- run: | | ||
sudo apt-get update --quiet || true | ||
sudo apt-get -yq --no-install-suggests --no-install-recommends install bmake libarchive-dev clang-14 lld-14 | ||
- name: create environment | ||
run: | | ||
echo "GITHUB_WORKSPACE = $GITHUB_WORKSPACE" | ||
echo "EXTRA_BUILD_ARGS=--cross-bindir=/usr/lib/llvm-14/bin" >> $GITHUB_ENV | ||
mkdir -p ../build | ||
echo "MAKEOBJDIRPREFIX=${PWD%/*}/build" >> $GITHUB_ENV | ||
# heh, works on Linux/BSD/macOS ... | ||
echo "NPROC=`getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1`" >> $GITHUB_ENV | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
- name: bootstrap bmake | ||
run: ./tools/build/make.py --debug $EXTRA_BUILD_ARGS TARGET=${{ matrix.target }} TARGET_ARCH=${{ matrix.target_arch }} -n | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |