Skip to content

[pull] trunk from spiceai:trunk #908

[pull] trunk from spiceai:trunk

[pull] trunk from spiceai:trunk #908

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: self-hosted
env:
HAS_SPICEIO_SECRET: ${{ secrets.UNAS_SMB_PASS != '' }}
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up spiceio
if: runner.os == 'macOS' && env.HAS_SPICEIO_SECRET == 'true'
id: setup-spiceio
uses: spiceai/spiceio/.github/actions/setup@18e298c86831c6969a0ff16ee827fe2fd816df7d # v0.5.1
with:
smb-url: smb://runner@192.168.3.148/ai_platform_dev
smb-pass: ${{ secrets.UNAS_SMB_PASS }}
token: ${{ github.token }}
bucket: sccache
region: us-west-1
- name: Set up sccache
if: runner.os == 'macOS' && steps.setup-spiceio.outputs.endpoint != ''
uses: ./.github/actions/setup-sccache
with:
spiceio_endpoint: ${{ steps.setup-spiceio.outputs.endpoint }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # 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@c10b8064de6f491fea524254123dbe5e09572f13 # 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: runner.os == 'macOS' && steps.setup-spiceio.outputs.endpoint != ''
run: sccache --show-stats
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v4
- name: Kill spiceio
if: always() && runner.os == 'macOS' && steps.setup-spiceio.outputs.pid != ''
run: kill ${{ steps.setup-spiceio.outputs.pid }} || true