Skip to content

Update fixing temp ref branch #51

Update fixing temp ref branch

Update fixing temp ref branch #51

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "main", "release_v*", "dev/milesp/doc-site-from-branch" ]
pull_request:
branches: [ "main", "release_v*" ]
schedule:
- cron: '28 22 * * 1'
env:
deploy_docs_site: false
jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04-64core
timeout-minutes: 360
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'javascript-typescript', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
submodules: 'recursive'
- if: matrix.language == 'c-cpp'
name: Setup environment
run: |
sudo apt update -y && sudo apt install -y --no-install-recommends \
git git-lfs gcc-11 g++-11 ninja-build ccache libgtest-dev libgmock-dev \
shellcheck curl doxygen python3 python3-pip python3-dev python3-distutils cmake
- if: matrix.language == 'c-cpp'
name: Install Python Dependencies
run: |
sudo apt update -y && sudo apt install -y --no-install-recommends \
python3 python3-pip python3-dev python3-distutils doxygen && sudo rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale recommonmark graphviz \
&& python3 -m pip install numpy==1.24.1 patchelf==0.17.2.1
- if: matrix.language == 'c-cpp'
name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.7.1'
linux-local-args: '["--toolkit"]'
- if: matrix.language == 'c-cpp'
name: Verify CUDA installation
run: |
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "CUDA install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
sudo ln -s ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/libcudart.so \
/usr/lib/x86_64-linux-gnu/libcuda.so
nvcc -V
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- if: matrix.language != 'c-cpp'
name: Autobuild
uses: github/codeql-action/autobuild@v3
- if: matrix.language == 'c-cpp'
name: Build CMake project
run: |
echo "Running CMake project build script"
./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=ON -DBUILD_PYTHON=ON" $*
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- if: github.ref == 'refs/heads/dev/milesp/doc-site-from-branch'
name: Check for Changes in main
id: check_main_changed
run: |
git fetch origin dev/milesp/doc-site-from-branch
if [[ $(git rev-list -n 1 HEAD) == $(git rev-list -n 1 origin/dev/milesp/doc-site-from-branch) ]]; then
echo "No changes in main"
echo "deploy_docs_site=false" >> $GITHUB_ENV
else
echo "Changes detected in main"
echo "deploy_docs_site=true" >> $GITHUB_ENV
- if: github.ref == 'refs/heads/dev/milesp/doc-site-from-branch'
name: Export Main Changed Status
run: |
echo "Main changed status: $deploy_docs_site"
env:
deploy_docs_site: ${{ steps.check_main_changed.outputs.deploy_docs_site }}
- if: github.ref == 'refs/heads/dev/milesp/doc-site-from-branch' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
name: Clean up Sphinx Build Directory
run: |
find build/docs/sphinx -name '*.doctree' -delete
find build/docs/sphinx -name '*.map' -delete
find build/docs/sphinx -name '*.pickle' -delete
find build/docs/sphinx -name '*.inv' -delete
find build/docs/sphinx -name '*.gz' -delete
- if: github.ref == 'refs/heads/dev/milesp/doc-site-from-branch' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
name: Create .nojekyll file
run: touch build/docs/sphinx/.nojekyll
- if: github.ref == 'refs/heads/dev/milesp/doc-site-from-branch' && matrix.language == 'c-cpp' && env.deploy_docs_site == 'true'
name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: build/docs/sphinx
branch: gh-pages
clean: true