Skip to content

Commit dbbbec1

Browse files
committed
ci: add GitHub Actions workflow on self-hosted Apple Silicon runners
Add lint (ruff) and pytest jobs on the self-hosted Apple Silicon runners [self-hosted, macos, tahoe, ARM64]; the DSL/composite tests require Metal and MLX. Pin actions/checkout to a commit SHA and install uv via its official install script. Guard jobs to apple/coreai-torch so forks don't run on the self-hosted runners.
1 parent 7171b3b commit dbbbec1

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
lint:
15+
if: github.repository == 'apple/coreai-torch'
16+
runs-on: [self-hosted, macos, tahoe, ARM64]
17+
timeout-minutes: 15
18+
steps:
19+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20+
- name: Ensure uv
21+
run: |
22+
command -v uv >/dev/null 2>&1 || curl -LsSf https://astral.sh/uv/install.sh | sh
23+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
24+
- run: uv run --extra dev ruff check .
25+
- run: uv run --extra dev ruff format --check .
26+
27+
python-test:
28+
if: github.repository == 'apple/coreai-torch'
29+
runs-on: [self-hosted, macos, tahoe, ARM64]
30+
timeout-minutes: 60
31+
steps:
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
33+
- name: Ensure uv
34+
run: |
35+
command -v uv >/dev/null 2>&1 || curl -LsSf https://astral.sh/uv/install.sh | sh
36+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
37+
- run: uv run --extra test pytest tests/ -n auto -m "not slow"

0 commit comments

Comments
 (0)