Skip to content

Sound LP-free ViT verification for VNN-COMP 2023 (ViTCrown) + competition wiring #703

Sound LP-free ViT verification for VNN-COMP 2023 (ViTCrown) + competition wiring

Sound LP-free ViT verification for VNN-COMP 2023 (ViTCrown) + competition wiring #703

Workflow file for this run

# This is a basic workflow to help you get started with MATLAB Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
run_cp:
type: boolean
required: false
default: false
env:
# Opt JS actions into Node 24 ahead of GitHub's forced 2026-06-16 default flip (Node 20
# EOL on the runners), so any incompatibility surfaces in CI now rather than mid-competition.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
jobs:
# This workflow contains a single job called "build"
test:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Reclaim runner disk space
# MATLAB + toolboxes are ~5 GB; ubuntu-latest ships ~14 GB free, which the
# Setup MATLAB download can exhaust -> the runner crashes with "No space left
# on device" before any test runs. Free ~20-30 GB of preinstalled tooling we
# never use so the download is reliable (mirrors test-matrix.yml).
run: |
echo "Disk before reclaim:"; df -h /
sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/local/lib/android \
/usr/share/swift /usr/local/share/powershell \
/opt/hostedtoolcache/CodeQL /usr/local/share/chromium /usr/local/share/boost || true
sudo docker image prune --all --force >/dev/null 2>&1 || true
echo "Disk after reclaim:"; df -h /
# Sets up MATLAB on the GitHub Actions runner
- name: Setup MATLAB
uses: matlab-actions/setup-matlab@v3
with:
release: R2024b
products: >
Computer_Vision_Toolbox
Control_System_Toolbox
Deep_Learning_Toolbox
Image_Processing_Toolbox
Optimization_Toolbox
Parallel_Computing_Toolbox
Statistics_and_Machine_Learning_Toolbox
Symbolic_Math_Toolbox
System_Identification_Toolbox
Deep_Learning_Toolbox_Converter_for_ONNX_Model_Format
Deep_Learning_Toolbox_Converter_for_PyTorch_Model_Format
Deep_Learning_Toolbox_Converter_for_TensorFlow_models
# Sets up python for CP
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Setup CP requirements
if: github.event.inputs.run_cp == 'true'
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirement.txt
continue-on-error: true
# Cache the tbxmanager toolboxes (MPT/glpk/sedumi/etc.) install.m downloads from the
# ETH/tbxmanager server (people.ee.ethz.ch -- the source of intermittent connection
# timeouts). OS/arch-keyed (glnxa64), MATLAB-release-independent, so this cache is
# shared with the R2026a matrix CI. startup_nnv's `tbxmanager restorepath` re-adds them
# from this dir -> install.m's downloads become no-ops on a warm cache. Restore/save are
# split so we only ever persist a COMPLETE install (gated on the last toolbox, sedumi),
# never a partial dir from a flaky download. Force-refresh by running the
# "CI (matrix-sharded)" workflow with rebuild_cache=true (deletes nnv-tbxmanager-*).
- name: Restore NNV tbxmanager toolboxes
id: tbxcache
uses: actions/cache/restore@v4
with:
path: code/nnv/tbxmanager
key: nnv-tbxmanager-${{ runner.os }}-${{ hashFiles('code/nnv/install.m') }}
restore-keys: |
nnv-tbxmanager-${{ runner.os }}-
# Runs a set of commands using the runners shell
- name: Run all tests
uses: matlab-actions/run-command@v2
with:
command: disp('Running NNV custom testing procedure!'); diary github_actions.txt; disp('creating file for testing'); diary off; cd("code/nnv"); install; results = runtests('tests', 'IncludeSubfolders', true); assertSuccess(results);
- name: Save NNV tbxmanager cache (only a COMPLETE install, only on a miss)
if: always() && steps.tbxcache.outputs.cache-hit != 'true' && hashFiles('code/nnv/tbxmanager/toolboxes/sedumi/**') != ''
uses: actions/cache/save@v4
with:
path: code/nnv/tbxmanager
key: nnv-tbxmanager-${{ runner.os }}-${{ hashFiles('code/nnv/install.m') }}