mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-24 06:34:33 +08:00
Add Apache 2.0 licensing, SPDX copyright headers on all source files, DCO enforcement, third-party notices, and CI enforcement. - LICENSE: Apache License 2.0 full text - DCO: Developer Certificate of Origin 1.1 - SPDX headers on all 176 source files (.rs, .py, .proto, .rego, .sh, .toml, .yaml, Dockerfiles) - scripts/update_license_headers.py: header management with --check mode - scripts/generate_third_party_notices.py: dependency license aggregation - THIRD-PARTY-NOTICES: generated listing of all Rust and Python deps - build/license.toml: mise tasks for license:check and license:update - CI: license-headers job in checks.yml, DCO check workflow - CONTRIBUTING.md: DCO sign-off requirement and license header docs - Cargo.toml: license changed to Apache-2.0, repository URL updated - pyproject.toml: license field added Closes #58
102 lines
2.4 KiB
YAML
102 lines
2.4 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
CARGO_INCREMENTAL: "0"
|
|
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SCCACHE_MEMCACHED_ENDPOINT: ${{ vars.SCCACHE_MEMCACHED_ENDPOINT }}
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: read
|
|
|
|
jobs:
|
|
license-headers:
|
|
name: License Headers
|
|
runs-on: build-amd64
|
|
container:
|
|
image: ghcr.io/nvidia/nv-agent-env/ci:latest
|
|
credentials:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install tools
|
|
run: mise install
|
|
|
|
- name: Check license headers
|
|
run: mise run license:check
|
|
|
|
rust:
|
|
name: Rust (${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: [build-amd64, build-arm64]
|
|
runs-on: ${{ matrix.runner }}
|
|
container:
|
|
image: ghcr.io/nvidia/nv-agent-env/ci:latest
|
|
credentials:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install tools
|
|
run: mise install
|
|
|
|
- name: Cache Rust target and registry
|
|
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
|
|
with:
|
|
# Separate caches for clippy (check-like) vs test (full build)
|
|
# so they don't thrash each other's artifacts
|
|
shared-key: rust-checks-${{ matrix.runner }}
|
|
# Cache the sccache directory too
|
|
cache-directories: .cache/sccache
|
|
|
|
- name: Format
|
|
run: mise run rust:format:check
|
|
|
|
- name: Lint
|
|
run: mise run rust:lint
|
|
|
|
- name: Test
|
|
run: mise run test:rust
|
|
|
|
- name: sccache stats
|
|
if: always()
|
|
run: mise x -- sccache --show-stats
|
|
|
|
python:
|
|
name: Python (${{ matrix.runner }})
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
runner: [build-amd64, build-arm64]
|
|
runs-on: ${{ matrix.runner }}
|
|
container:
|
|
image: ghcr.io/nvidia/nv-agent-env/ci:latest
|
|
credentials:
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install tools
|
|
run: mise install
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --frozen
|
|
|
|
- name: Lint
|
|
run: mise run python:lint
|
|
|
|
- name: Test
|
|
run: mise run test:python
|