Skip to content

Commit

Permalink
Attempt to use CodeQL
Browse files Browse the repository at this point in the history
  • Loading branch information
zxombie committed Nov 6, 2023
1 parent 475fa89 commit 10e2055
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
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

0 comments on commit 10e2055

Please sign in to comment.