-
-
Notifications
You must be signed in to change notification settings - Fork 60
53 lines (51 loc) · 1.83 KB
/
stats.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
name: Stats
on:
push:
branches:
- "master"
env:
MAKEOPTS: -j2
jobs:
stats:
name: Generate stats
runs-on: ubuntu-22.04
steps:
- name: Install cross-compiler
run: sudo apt-get update && sudo apt-get install --yes gcc-arm-none-eabi
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- run: pipx install poetry
- run: poetry install --only=stats
- name: Build missing commits
env:
STORAGE_ACCOUNT: ${{ secrets.STORAGE_ACCOUNT }}
STORAGE_KEY: ${{ secrets.STORAGE_KEY }}
STORAGE_URL: ${{ secrets.STORAGE_URL }}
CI_STATUS_TABLE: ${{ secrets.CI_STATUS_TABLE }}
FIRMWARE_SIZE_TABLE: ${{ secrets.FIRMWARE_SIZE_TABLE }}
run: poetry run .github/build-missing-commits.py
- name: Download commit metadata
env:
STORAGE_ACCOUNT: ${{ secrets.STORAGE_ACCOUNT }}
STORAGE_KEY: ${{ secrets.STORAGE_KEY }}
STORAGE_URL: ${{ secrets.STORAGE_URL }}
FIRMWARE_SIZE_TABLE: ${{ secrets.FIRMWARE_SIZE_TABLE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: poetry run .github/download-commit-metadata.py
- name: Build web pages
run: poetry run .github/build-stats-web.py
- name: Install lftp
if: ${{ success() }}
run: sudo apt-get update && sudo apt-get install --yes lftp
- name: Publish
if: ${{ success() }}
shell: bash
env:
LFTP_USER: ${{ secrets.lftpUser }}
LFTP_PASSWORD: ${{ secrets.lftpPassword }}
LFTP_SITE: ${{ secrets.lftpSite }}
run: |
lftp -e "set ssl:check-hostname false; open --user $LFTP_USER --env-password $LFTP_SITE && mirror --verbose --reverse --delete --exclude=.htaccess build stats; exit"