-
Notifications
You must be signed in to change notification settings - Fork 14
45 lines (45 loc) · 1.92 KB
/
adv-ty-refine.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
name: typecheck CI
on:
push:
branches:
- adv-ty-refine
env:
ESMETA_HOME: ${{ github.workspace }}
jobs:
report_sheets:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Build ESMeta
run: |
sbt assembly
- name: Run Typecheck
run: ./bin/esmeta tycheck -status -tycheck:log
- name: Parse Typecheck Log
if: always()
run: |
commit_url=https://github.com/${{github.repository}}/commit/${{github.sha}}
# output URL, date, duration, error, iter, analyzed functions, analyzed nodes, analyzed returns
data="[[\"$commit_url\", \"$(date -I)\", $(awk '/duration:/ {gsub(/,/, "", $2); printf "%s, ", $2}
/error:/ {printf "%s, ", $2}
/iter:/ {gsub(/,/, "", $2); printf "%s, ", $2}
/funcs:/ {split($2, arr, "/"); gsub(/,/, "", arr[1]); gsub(/,/, "", arr[2]); printf "%s, ", arr[1]}
/nodes:/ {split($2, arr, "/"); gsub(/,/, "", arr[1]); gsub(/,/, "", arr[2]); printf "%s, ", arr[1]}
/returns:/ {split($2, arr, "/"); gsub(/,/, "", arr[1]); gsub(/,/, "", arr[2]); printf "%s", arr[1]}' logs/analyze/summary.yml)]]"
echo "test_result=$data" >> $GITHUB_ENV
- name: Update worksheet
if: always()
uses: jroehl/[email protected] # you can specify '@release' to always have the latest changes
with:
spreadsheetId: 16c8B7ILFGFjJMV4HcvX_7lPG6IrwQIekqfIJDbKgCNw
commands: | # list of commands, specified as a valid JSON string
[
{ "command": "getWorksheet", "args": { "worksheetTitle": "stats" }},
{ "command": "appendData", "args": { "data": ${{ env.test_result }}, "minCol": 1 }}
]
env:
GSHEET_CLIENT_EMAIL: ${{ secrets.GSHEET_CLIENT_EMAIL }}
GSHEET_PRIVATE_KEY: ${{ secrets.GSHEET_PRIVATE_KEY }}