-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (98 loc) · 3.25 KB
/
Copy pathnightly.yml
File metadata and controls
110 lines (98 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
108
109
110
name: Nightly
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
inputs:
editor_sha:
description: Optional Defold editor commit SHA or prefix
required: false
type: string
comment:
description: Optional note to store in metrics.csv and mark in charts
required: false
type: string
commit_to_default_branch:
description: Commit updated metrics back to the default branch
required: false
default: false
type: boolean
target_branch:
description: Override push branch when committing
required: false
type: string
permissions:
contents: write
concurrency:
group: nightly-metrics
cancel-in-progress: false
jobs:
nightly:
runs-on: [self-hosted, macOS, ARM64, defold]
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654
with:
java-version: '25'
distribution: 'temurin'
- name: Verify Java tools
run: |
java -version
which java
which jcmd
jcmd -l || true
- name: Show runner details
run: uname -a
- name: Compute dependency cache key
id: dependency-cache
env:
GITHUB_TOKEN: ${{ github.token }}
run: python scripts/dependency_cache.py key --project defold/big-synthetic-project
- name: Restore dependency cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: work/dependency-cache
key: ${{ runner.os }}-${{ runner.arch }}-defold-deps-${{ steps.dependency-cache.outputs.key }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-defold-deps-
- name: Run nightly pipeline
env:
BENCHMARK_PREFER_PATH_JCMD: '1'
GITHUB_TOKEN: ${{ github.token }}
PYTHONUNBUFFERED: '1'
COMMIT_ENABLED: ${{ github.event_name == 'schedule' || inputs.commit_to_default_branch }}
TARGET_BRANCH: ${{ inputs.target_branch || github.event.repository.default_branch }}
EDITOR_SHA: ${{ inputs.editor_sha }}
COMMENT: ${{ inputs.comment || '' }}
run: |
mkdir -p artifacts work data charts
python scripts/nightly.py \
--work-dir work \
--artifacts-dir artifacts \
--metrics-csv data/metrics.csv \
--charts-dir charts \
--project defold/big-synthetic-project \
--commit "$COMMIT_ENABLED" \
--target-branch "$TARGET_BRANCH" \
${EDITOR_SHA:+--editor-sha "$EDITOR_SHA"} \
${COMMENT:+--comment "$COMMENT"}
- name: Upload nightly artifacts
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
with:
name: benchmark-artifacts
path: |
artifacts
data/metrics.csv
charts
README.md
if-no-files-found: warn