Skip to content

Commit

Permalink
Merge branch 'ershi/codeql' into 'main'
Browse files Browse the repository at this point in the history
Add a CodeQL workflow, minor revisions to existing GH workflows

See merge request omniverse/warp!518
  • Loading branch information
shi-eric committed May 26, 2024
2 parents e97ceea + ba35562 commit 37285d7
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 37 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ name: Build and Test Warp
on:
workflow_call:
workflow_dispatch:
push:
tags:
- v*
branches:
- main
- release-*
schedule: # Schedule workflow only runs on the default branch
- cron: "45 9 * * *"

env:
PYTHON_VERSION: 3.11
Expand All @@ -29,7 +37,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy
pip install --no-cache-dir --upgrade numpy
tools/packman/packman install -l _build/target-deps/cuda cuda 11.8.0_522.06-abe3d9d7-windows-x86_64
tools/packman/packman install -l _build/host-deps/msvc msvc 2019-16.11.24
tools/packman/packman install -l _build/host-deps/winsdk winsdk 10.17763
Expand All @@ -56,7 +64,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy
pip install --no-cache-dir --upgrade numpy
- name: Build Warp
run: |
tools/packman/packman install -l _build/target-deps/cuda cuda 11.8.0_520.61-d8963068-linux-x86_64
Expand All @@ -81,7 +89,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy
pip install --no-cache-dir --upgrade numpy
- name: Build
run: |
python build_lib.py
Expand Down Expand Up @@ -113,8 +121,8 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy coverage[toml] usd-core
pip install .
pip install --no-cache-dir --upgrade numpy coverage[toml] usd-core
pip install --no-cache-dir .
- name: Run Tests
run: python -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
Expand Down Expand Up @@ -153,8 +161,8 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy coverage[toml] usd-core
pip install .
pip install --no-cache-dir --upgrade numpy coverage[toml] usd-core
pip install --no-cache-dir .
- name: Run Tests
run: python -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
Expand Down Expand Up @@ -193,8 +201,8 @@ jobs:
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade numpy coverage[toml] usd-core
pip install .
pip install --no-cache-dir --upgrade numpy coverage[toml] usd-core
pip install --no-cache-dir .
- name: Run Tests
run: python -m warp.tests --junit-report-xml rspec.xml --coverage --coverage-xml coverage.xml -s autodetect
- name: Test Summary
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Copyright (c) 2024 NVIDIA CORPORATION. All rights reserved.
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.

name: "CodeQL"

on:
push:
tags:
- v*
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
schedule:
- cron: "45 9 * * *"

env:
PYTHON_VERSION: 3.11

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
packages: read
strategy:
fail-fast: false
matrix:
language: [python]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
18 changes: 0 additions & 18 deletions .github/workflows/nightly.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ ci:
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [ --fix ] # Apply fixes to resolve lint violations.
# Run the formatter.
- id: ruff-format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.3.7
hooks:
# Run the linter.
- id: ruff
args: [--fix] # Apply fixes to resolve lint violations.
# Run the formatter.
- id: ruff-format

0 comments on commit 37285d7

Please sign in to comment.