Skip to content

Commit a886186

Browse files
committed
wip
1 parent e763a83 commit a886186

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/just-works.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Just Works
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- release/*
8+
pull_request:
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}-${{ github.event_name == 'schedule' }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
configuration-matrix:
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
# Linux x86_64
22+
- ubuntu-latest
23+
# macOS arm64
24+
- macos-m1-stable
25+
python-version:
26+
- 3.10
27+
- 3.11
28+
- 3.12
29+
runs-on: ${{ matrix.os }}
30+
timeout-minutes: 60
31+
steps:
32+
- uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
- uses: actions/checkout@v4
36+
- uses: Build wheel
37+
run: |
38+
python3 -m venv .setup-venv
39+
source .setup-venv/bin/activate
40+
pip install -r requirements-dev.txt torch
41+
python3 setup.py bdist_wheel --dist-dir=/tmp/executorch_wheel
42+
deactivate
43+
rm -rf .setup-venv
44+
45+
FILE_COUNT=$(ls /tmp/executorch_wheel/*.whl 2>/dev/null | wc -l)
46+
if [[ "$FILE_COUNT" -eq 1 ]]; then
47+
WHEEL_PATH=$(ls /tmp/executorch_wheel/*.whl)
48+
echo "EXECUTORCH_WHEEL=$WHEEL_PATH" >> $GITHUB_ENV
49+
else
50+
echo "Error: expected exactly one wheel file in the dist folder, found $FILE_COUNT:"
51+
exit 1
52+
fi
53+
- name: Install wheel
54+
run: |
55+
python3 -m venv .test-venv
56+
source .test-venv/bin/activate
57+
pip install torch $EXECUTORCH_WHEEL
58+
- name: Test wheel
59+
run: |
60+
python3 build/packaging/smoke_test.py

0 commit comments

Comments
 (0)