Skip to content

[pull] trunk from spiceai:trunk #1108

[pull] trunk from spiceai:trunk

[pull] trunk from spiceai:trunk #1108

name: 'CodeQL'
on:
workflow_dispatch:
push:
branches: [trunk, release-*]
paths-ignore:
- 'docs/**'
- '.github/**'
pull_request:
branches: [trunk, develop]
paths-ignore:
- 'docs/**'
- '.github/**'
schedule:
- cron: '19 18 * * 4'
jobs:
analyze:
name: Analyze
runs-on: spiceai-dev-runners
env:
HAS_TEST_MINIO_SECRET: ${{ secrets.TEST_MINIO_ENDPOINT != '' && secrets.TEST_MINIO_ACCESS_KEY != '' && secrets.TEST_MINIO_SECRET_KEY != '' }}
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_MINIO_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_MINIO_SECRET_KEY }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['rust']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'rust' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up sccache with local MinIO
if: env.HAS_TEST_MINIO_SECRET == 'true'
uses: ./.github/actions/setup-sccache
with:
minio_endpoint: ${{ secrets.TEST_MINIO_ENDPOINT }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Set up make
if: runner.os != 'macOS'
uses: ./.github/actions/setup-make
- name: Set up cc
if: runner.os != 'macOS'
uses: ./.github/actions/setup-cc
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Show sccache stats
if: env.HAS_TEST_MINIO_SECRET == 'true'
run: sccache --show-stats
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4