Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 62 additions & 84 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install ruff==0.15.0
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install dependencies
run: uv sync --locked --extra dev

- name: Run ruff checks
run: |
ruff check . --output-format=github
ruff format --check .
uv run ruff check . --output-format=github
uv run ruff format --check .

python-typecheck:
name: Python Type Checking (mypy)
Expand All @@ -87,20 +91,22 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install dependencies
run: uv sync --locked --extra dev

- name: Run mypy
run: mypy .
run: uv run mypy .

ui-contracts:
name: UI and Runtime Contracts
Expand All @@ -111,33 +117,31 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install dependencies
run: uv sync --locked --extra dev

- name: Validate runtime HTTP OpenAPI contract (structural)
run: |
python tests/contracts/runtime-http/validate-runtime-http-openapi.py
run: uv run python tests/contracts/runtime-http/validate-runtime-http-openapi.py

- name: Validate runtime HTTP OpenAPI contract (examples)
run: |
python tests/contracts/runtime-http/validate-runtime-http-examples.py
run: uv run python tests/contracts/runtime-http/validate-runtime-http-examples.py

- name: Validate machine profile contract
run: |
python tests/contracts/machine-profile/validate-machine-profiles.py
run: uv run python tests/contracts/machine-profile/validate-machine-profiles.py

- name: Validate telemetry timeseries contract
run: |
python tests/contracts/telemetry-timeseries/validate-telemetry-timeseries.py
run: uv run python tests/contracts/telemetry-timeseries/validate-telemetry-timeseries.py

core-build-test:
name: ${{ matrix.lane }}
Expand Down Expand Up @@ -178,30 +182,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y ninja-build g++

- name: Validate requirements lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
run: uv sync --locked --extra dev

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand All @@ -217,23 +210,19 @@ jobs:

- name: Validate runtime config contract
if: runner.os == 'Linux' && matrix.configure_preset == 'ci-linux-release-strict'
run: |
python tests/contracts/runtime-config/validate-runtime-configs.py --runtime-bin build/ci-linux-release-strict/core/anolis-runtime
run: uv run python tests/contracts/runtime-config/validate-runtime-configs.py --runtime-bin build/ci-linux-release-strict/core/anolis-runtime

- name: Validate machine profile contract
if: runner.os == 'Linux' && matrix.configure_preset == 'ci-linux-release-strict'
run: |
python tests/contracts/machine-profile/validate-machine-profiles.py
run: uv run python tests/contracts/machine-profile/validate-machine-profiles.py

- name: Validate runtime HTTP OpenAPI contract (structural)
if: runner.os == 'Linux' && matrix.configure_preset == 'ci-linux-release-strict'
run: |
python tests/contracts/runtime-http/validate-runtime-http-openapi.py
run: uv run python tests/contracts/runtime-http/validate-runtime-http-openapi.py

- name: Validate runtime HTTP OpenAPI contract (examples)
if: runner.os == 'Linux' && matrix.configure_preset == 'ci-linux-release-strict'
run: |
python tests/contracts/runtime-http/validate-runtime-http-examples.py
run: uv run python tests/contracts/runtime-http/validate-runtime-http-examples.py

- name: Run CTest
run: ctest --preset "${{ matrix.test_preset }}"
Expand Down Expand Up @@ -273,30 +262,19 @@ jobs:
ref: ${{ steps.pins.outputs.ref }}
path: anolis-provider-sim

- name: Validate requirements lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
run: uv sync --locked --extra dev

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand All @@ -323,7 +301,7 @@ jobs:

- name: Configure compatibility preset
run: |
cmake --preset ci-linux-compat \
uv run cmake --preset ci-linux-compat \
-DANOLIS_ENABLE_PYTHON_CTEST=ON \
-DANOLIS_PROVIDER_SIM_EXE="${{ steps.provider.outputs.exe }}"

Expand All @@ -334,14 +312,14 @@ jobs:
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/build/ci-linux-compat/vcpkg_installed/x64-linux/lib
run: |
python tests/contracts/runtime-http/validate-runtime-http-conformance.py \
uv run python tests/contracts/runtime-http/validate-runtime-http-conformance.py \
--runtime-bin build/ci-linux-compat/core/anolis-runtime \
--provider-bin "${{ steps.provider.outputs.exe }}"

- name: Run CTest compatibility entrypoint (Python)
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/build/ci-linux-compat/vcpkg_installed/x64-linux/lib
run: ctest --preset ci-linux-compat -L integration
run: uv run ctest --preset ci-linux-compat -L integration

version-sync:
uses: anolishq/.github/.github/workflows/version-sync.yml@main
Expand Down
55 changes: 9 additions & 46 deletions .github/workflows/extended.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y ninja-build g++

- name: Validate requirements lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
Expand Down Expand Up @@ -126,19 +113,6 @@ jobs:
sudo apt-get update
sudo apt-get install -y ninja-build g++

- name: Validate requirements lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
with:
Expand Down Expand Up @@ -265,35 +239,24 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Validate requirements lockfile
shell: bash
run: |
set -euo pipefail
LOCKFILE="requirements-lock.txt"
test -f "$LOCKFILE"
if od -An -tx1 "$LOCKFILE" | tr -s ' ' '\n' | grep -qx '00'; then
echo "ERROR: $LOCKFILE contains NUL bytes (binary corruption)" >&2
exit 1
fi
iconv -f UTF-8 -t UTF-8 "$LOCKFILE" > /dev/null 2>&1
echo "OK: $LOCKFILE is valid UTF-8 and contains no NUL bytes"

- name: Install coverage tools
run: |
sudo apt-get update
sudo apt-get install -y ninja-build g++ lcov

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
run: uv sync --locked --extra dev

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand Down
32 changes: 18 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ jobs:
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
run: uv sync --locked --extra dev

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand Down Expand Up @@ -129,17 +131,19 @@ jobs:
id: version
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"

- name: Setup Python and dependencies
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: requirements-lock.txt

- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: |
pyproject.toml
uv.lock

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-lock.txt
run: uv sync --locked --extra dev

- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
Expand Down
Loading
Loading