Repository navigation
107 lines (104 loc) · 3.25 KB
/
Copy pathpython.yml
File metadata and controls
107 lines (104 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Continuous integration
on: [push, pull_request]
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
# 3.10–3.14 covers the default Python in Ubuntu 22.04 through 26.04
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --group dev --extra zulip
- name: Test with pytest
run: |
for f in tests/test_*.py; do uv run pytest "$f"; done
ty:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.14"
- name: Install dependencies
run: uv sync --group dev --extra zulip
- name: Type check with ty
run: uv run ty check src/running
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.14"
- name: Install dependencies
run: uv sync --group dev --extra zulip
- name: Lint with ruff
run: uv run ruff check src tests
- name: Check formatting with ruff
run: uv run ruff format --check src tests
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
python-version: "3.14"
- name: Build wheel and sdist
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
smoke-test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, ubuntu-latest]
steps:
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
- name: Download wheel
uses: actions/download-artifact@v8
with:
name: dist
- name: Install running-ng
run: pip install running_ng-*.whl
- name: Download DaCapo
run: |
curl -sL -o dacapo.zip https://download.dacapobench.org/chopin/dacapo-23.11-MR2-chopin-minimal.zip
unzip -q dacapo.zip
ls *.jar
- name: Run smoke test
run: |
cat > ci_smoke.yml << EOF
includes:
- "\$RUNNING_NG_PACKAGE_DATA/base/runbms.yml"
overrides:
"suites.dacapochopin.path": "$PWD/dacapo-23.11-MR2-chopin-minimal.jar"
"suites.dacapochopin.timing_iteration": 1
runtimes:
ci-temurin:
type: OpenJDK
release: 21
home: "$JAVA_HOME"
configs:
- "ci-temurin|dacapochopin_jdk21"
benchmarks:
dacapochopin:
- fop
EOF
running runbms /tmp/ci_test ci_smoke.yml -s 2 -i 1 --exit-on-failure