-
Notifications
You must be signed in to change notification settings - Fork 5
138 lines (112 loc) · 4.38 KB
/
nightly-tests.yml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Nightly Full AMMR tests
on:
schedule:
- cron: 0 3 * * *
workflow_dispatch: {}
concurrency:
group: ci-nightly-${{ github.ref }}
cancel-in-progress: true
jobs:
test-windows:
if: github.repository == 'anybody/ammr'
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
ams_version: ["7.5_Beta"]
test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
env:
# Triggers a warning at 20 deg muscles discretization angles
# I.e. wrapping on very small sharp corners
ShortestPathMaxAngle: 0.3491
steps:
- uses: actions/checkout@v4
- uses: anybody/setup-anybody@main
name: Install AnyBody
with:
anybody-version: "7.5.0"
anybody-version-suffix: "Beta"
- uses: prefix-dev/[email protected]
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
- name: Run full AMMR tests
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pixi run pytest -n auto --dist worksteal `
--splits 10 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration `
--durations=20 `
--store-durations --clean-durations `
--runslow
- name: Upload partial durations
uses: actions/upload-artifact@v3
with:
name: test-durations-${{ matrix.test_group }}
path: |
Tests\.test_durations
retention-days: 1
test-linux:
if: github.repository == 'anybody/ammr'
runs-on: ubuntu-latest
container: ghcr.io/anybody/anybodycon-github-actions:${{ matrix.ams_version }}
env:
ANYBODY_SUPPRESS_DEPRECATION_MESSAGES: ${{ fromJSON('{"7.4":"Off","7.5_Beta":"On"}')[matrix.ams_version] }}
strategy:
fail-fast: false
matrix:
ams_version: ["7.4", "7.5_Beta"]
test_group: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
with:
ref: ${{ fromJSON('{"7.4":"master-ammr-2.4.x","7.5_Beta":"master"}')[matrix.ams_version] }}
- name: Set debug env vars
run: echo ${{ github.event.inputs.debug_config }} >> $GITHUB_ENV
- name: Run tests
env:
RLM_LICENSE_PASSWORD: ${{ secrets.LICENSE_PASSWORD }}
RLM_LICENSE: ${{ secrets.LICENSE_SERVER }}
run: |
cd Tests
pytest -n auto \
--splits 5 --group ${{ matrix.test_group }} --splitting-algorithm=least_duration \
--only-load \
--runslow
combine-and-upload-timings:
runs-on: ubuntu-latest
needs: [test-windows]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Combine test-durations
run: |
import json, pathlib
data = {}
for file in pathlib.Path.cwd().glob("test-durations-*/*"):
data.update(json.loads(file.read_text()))
data = {k: v for k, v in sorted(data.items(), key=lambda x: x[1], reverse=True)}
test_durations = pathlib.Path('Tests/.test_durations')
if set(data) != set(json.loads(test_durations.read_text())):
test_durations.write_text(json.dumps(data, indent=2))
shell: python
- name: Create updated durations PR
uses: peter-evans/create-pull-request@v5
with:
push-to-fork: anybody-bot/ammr
token: ${{ secrets.DURATIONS_TOKEN }}
branch: update-durations
add-paths: Tests/.test_durations
delete-branch: true
commit-message: Update test durations
author: AnyBody Bot <[email protected]>
committer: AnyBody Bot <[email protected]>
title: 🤖 Update test durations
body: |
The tests suite has changed and I have collected the newest test durations
from yesterdays nightly test. This PR updates the `Tests/.test_durations` file.
[nightly-tests.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/nightly-tests.yml
This PR was created automatically by the [`nightly-tests.yml`][nightly-tests.yml] workflow.