Update msvc.yml #16
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: Microsoft C++ Code Analysis | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
schedule: | |
- cron: '17 2 * * 2' | |
env: | |
# Path to the CMake build directory. | |
build: '${{ github.workspace }}/build' | |
CC: '/usr/bin/gcc' | |
CXX: '/usr/bin/g++' | |
permissions: | |
contents: read | |
security-events: write | |
jobs: | |
analyze: | |
permissions: | |
contents: read | |
security-events: write | |
actions: read | |
name: Analyze | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y tcsh xfonts-base libssl-dev \ | |
python-is-python3 \ | |
python3-matplotlib python3-numpy \ | |
python3-flask python3-flask-cors \ | |
python3-pil \ | |
gsl-bin libgsl-dev \ | |
libglib2.0-dev \ | |
netpbm gnome-tweaks \ | |
libjpeg62 xvfb xterm vim curl \ | |
gedit evince eog \ | |
libglu1-mesa-dev libglw1-mesa-dev \ | |
libxm4 build-essential \ | |
libcurl4-openssl-dev libxml2-dev \ | |
libgfortran-14-dev libgomp1 \ | |
gnome-terminal nautilus \ | |
firefox xfonts-100dpi \ | |
r-base-dev cmake bc \ | |
libgdal-dev libopenblas-dev \ | |
libnode-dev libudunits2-dev | |
pip install setuptools | |
- name: Clean up disk space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo apt-get clean | |
- name: Clone AFNI repository | |
run: git clone https://github.com/afni/afni.git | |
- name: Configure CMake | |
run: | | |
mkdir -p ${{ env.build }} | |
cd ${{ env.build }} | |
cmake ../afni -DAFNI_COMPILER_CHECK=OFF | |
- name: Build AFNI | |
run: | | |
cd ${{ env.build }} | |
make | |
- name: Initialize MSVC Code Analysis | |
uses: microsoft/msvc-code-analysis-action@04825f6d9e00f87422d6bf04e1a38b1f3ed60d99 | |
id: run-analysis | |
with: | |
cmakeBuildDirectory: ${{ env.build }} | |
ruleset: NativeRecommendedRules.ruleset | |
- name: Upload SARIF to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.run-analysis.outputs.sarif }} | |
- name: Clean up disk space | |
run: | | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf /usr/local/share/boost | |
sudo apt-get clean | |
sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
- name: Monitor disk space | |
run: df -h | |
- name: Monitor workspace usage | |
run: du -sh /home/runner/work/afni/afni |