Skip to content

CI · PR #65 · dev/extern · @pkmandke #241

CI · PR #65 · dev/extern · @pkmandke

CI · PR #65 · dev/extern · @pkmandke #241

Workflow file for this run

name: CI
run-name: >-
${{ github.event_name == 'pull_request'
&& format('CI · PR #{0} · {1} · @{2}', github.event.pull_request.number, github.event.pull_request.head.ref, github.actor)
|| format('CI · push {0} · @{1}', github.ref_name, github.actor) }}
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Stage 1: cheap correctness gate (ubuntu-latest, ungated). ──
check:
name: Linux / make check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make check`
run: make check
test-smoke:
name: Linux / make test-smoke / torch=${{ matrix.torch_version }}
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
strategy:
fail-fast: false
matrix:
include:
- torch_group: torch_2_8
torch_version: "2.8"
- torch_group: torch_2_9
torch_version: "2.9"
- torch_group: torch_2_10
torch_version: "2.10"
- torch_group: torch_2_11
torch_version: "2.11"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-smoke`
run: make test-smoke TORCH_GROUP=${{ matrix.torch_group }}
test-tutorials:
name: Linux / make test-tutorials
runs-on: ubuntu-latest
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-tutorials`
run: make test-tutorials
# ── Stage 2: full test matrix, gated on Stage 1. ──
macos-tests:
name: macOS / make test-highest-pytorch / markers=not-slow
needs: [check, test-smoke, test-tutorials]
if: github.repository == 'apple/coreai-optimization'
runs-on: [self-hosted, macos, tahoe, ARM64]
timeout-minutes: 60
env:
INSTALL_PRECOMMIT: "false"
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-highest-pytorch`
run: make test-highest-pytorch PYTEST_ARGS="--marker 'not slow' --junit"
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results-macos-highest-fast
path: test-results/
linux-tests:
name: Linux / make test-${{ matrix.torch }}-pytorch / markers=${{ matrix.speed == 'slow' && 'slow' || 'not-slow' }}
needs: [check, test-smoke, test-tutorials]
runs-on: ubuntu-latest
timeout-minutes: 120
env:
INSTALL_PRECOMMIT: "false"
strategy:
fail-fast: false
matrix:
torch: [highest, lowest]
speed: [slow, fast]
steps:
- name: Check out repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
enable-cache: false
- name: Run `make test-${{ matrix.torch }}-pytorch`
run: make test-${{ matrix.torch }}-pytorch PYTEST_ARGS="--marker '${{ matrix.speed == 'slow' && 'slow' || 'not slow' }}' --junit"
- name: Upload test results
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: test-results-linux-${{ matrix.torch }}-${{ matrix.speed }}
path: test-results/