|  | 
| 7 | 7 | 
 | 
| 8 | 8 | jobs: | 
| 9 | 9 |   release: | 
| 10 |  | -    runs-on: ubuntu-18.04 | 
|  | 10 | +    runs-on: ubuntu-20.04 | 
| 11 | 11 | 
 | 
| 12 | 12 |     # need to manually check for a couple things | 
| 13 | 13 |     # - tests passed? | 
| @@ -73,89 +73,70 @@ jobs: | 
| 73 | 73 |           # previous results to compare against? | 
| 74 | 74 |           [ -n "$LFS_PREV_VERSION" ] && curl -sS \ | 
| 75 | 75 |             "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/` | 
| 76 |  | -              `status/$LFS_PREV_VERSION" \ | 
|  | 76 | +              `status/$LFS_PREV_VERSION?per_page=100" \ | 
| 77 | 77 |             | jq -re 'select(.sha != env.GITHUB_SHA) | .statuses[]' \ | 
| 78 | 78 |             >> prev-results.json \ | 
| 79 | 79 |             || true | 
| 80 | 80 | 
 | 
| 81 |  | -          # unfortunately these each have their own format | 
| 82 |  | -          [ -e results/code-thumb.csv ] && ( \ | 
| 83 |  | -            export PREV="$(jq -re ' | 
| 84 |  | -                  select(.context == "results / code").description | 
| 85 |  | -                  | capture("Code size is (?<result>[0-9]+)").result' \ | 
| 86 |  | -                prev-results.json || echo 0)" | 
| 87 |  | -            ./scripts/code.py -u results/code-thumb.csv -s | awk ' | 
| 88 |  | -              NR==2 {printf "Code size,%d B",$2} | 
| 89 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 90 |  | -                printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
| 91 |  | -              NR==2 {printf "\n"}' \ | 
| 92 |  | -            >> results.csv) | 
| 93 |  | -          [ -e results/code-thumb-readonly.csv ] && ( \ | 
| 94 |  | -            export PREV="$(jq -re ' | 
| 95 |  | -                  select(.context == "results / code (readonly)").description | 
| 96 |  | -                  | capture("Code size is (?<result>[0-9]+)").result' \ | 
| 97 |  | -                prev-results.json || echo 0)" | 
| 98 |  | -            ./scripts/code.py -u results/code-thumb-readonly.csv -s | awk ' | 
| 99 |  | -              NR==2 {printf "Code size<br/>(readonly),%d B",$2} | 
| 100 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 101 |  | -                printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
| 102 |  | -              NR==2 {printf "\n"}' \ | 
| 103 |  | -            >> results.csv) | 
| 104 |  | -          [ -e results/code-thumb-threadsafe.csv ] && ( \ | 
| 105 |  | -            export PREV="$(jq -re ' | 
| 106 |  | -                  select(.context == "results / code (threadsafe)").description | 
| 107 |  | -                  | capture("Code size is (?<result>[0-9]+)").result' \ | 
| 108 |  | -                prev-results.json || echo 0)" | 
| 109 |  | -            ./scripts/code.py -u results/code-thumb-threadsafe.csv -s | awk ' | 
| 110 |  | -              NR==2 {printf "Code size<br/>(threadsafe),%d B",$2} | 
| 111 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 112 |  | -                printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
| 113 |  | -              NR==2 {printf "\n"}' \ | 
| 114 |  | -            >> results.csv) | 
| 115 |  | -          [ -e results/code-thumb-migrate.csv ] && ( \ | 
| 116 |  | -            export PREV="$(jq -re ' | 
| 117 |  | -                  select(.context == "results / code (migrate)").description | 
| 118 |  | -                  | capture("Code size is (?<result>[0-9]+)").result' \ | 
| 119 |  | -                prev-results.json || echo 0)" | 
| 120 |  | -            ./scripts/code.py -u results/code-thumb-migrate.csv -s | awk ' | 
| 121 |  | -              NR==2 {printf "Code size<br/>(migrate),%d B",$2} | 
| 122 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 123 |  | -                printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
| 124 |  | -              NR==2 {printf "\n"}' \ | 
| 125 |  | -            >> results.csv) | 
| 126 |  | -          [ -e results/code-thumb-error-asserts.csv ] && ( \ | 
| 127 |  | -            export PREV="$(jq -re ' | 
| 128 |  | -                  select(.context == "results / code (error-asserts)").description | 
| 129 |  | -                  | capture("Code size is (?<result>[0-9]+)").result' \ | 
| 130 |  | -                prev-results.json || echo 0)" | 
| 131 |  | -            ./scripts/code.py -u results/code-thumb-error-asserts.csv -s | awk ' | 
| 132 |  | -              NR==2 {printf "Code size<br/>(error-asserts),%d B",$2} | 
| 133 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 134 |  | -                printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
| 135 |  | -              NR==2 {printf "\n"}' \ | 
| 136 |  | -            >> results.csv) | 
| 137 |  | -          [ -e results/coverage.csv ] && ( \ | 
| 138 |  | -            export PREV="$(jq -re ' | 
| 139 |  | -                  select(.context == "results / coverage").description | 
| 140 |  | -                  | capture("Coverage is (?<result>[0-9\\.]+)").result' \ | 
| 141 |  | -                prev-results.json || echo 0)" | 
| 142 |  | -            ./scripts/coverage.py -u results/coverage.csv -s | awk -F '[ /%]+' ' | 
| 143 |  | -              NR==2 {printf "Coverage,%.1f%% of %d lines",$4,$3} | 
| 144 |  | -              NR==2 && ENVIRON["PREV"]+0 != 0 { | 
| 145 |  | -                printf " (%+.1f%%)",$4-ENVIRON["PREV"]} | 
| 146 |  | -              NR==2 {printf "\n"}' \ | 
| 147 |  | -            >> results.csv) | 
| 148 |  | -
 | 
| 149 |  | -          # transpose to GitHub table | 
| 150 |  | -          [ -e results.csv ] || exit 0 | 
| 151 |  | -          awk -F ',' ' | 
| 152 |  | -            {label[NR]=$1; value[NR]=$2} | 
| 153 |  | -            END { | 
| 154 |  | -              for (r=1; r<=NR; r++) {printf "| %s ",label[r]}; printf "|\n"; | 
| 155 |  | -              for (r=1; r<=NR; r++) {printf "|:--"}; printf "|\n"; | 
| 156 |  | -              for (r=1; r<=NR; r++) {printf "| %s ",value[r]}; printf "|\n"}' \ | 
| 157 |  | -            results.csv > results.txt | 
| 158 |  | -          echo "RESULTS:" | 
|  | 81 | +          # build table for GitHub | 
|  | 82 | +          echo "<table>" >> results.txt | 
|  | 83 | +          echo "<thead>" >> results.txt | 
|  | 84 | +          echo "<tr>" >> results.txt | 
|  | 85 | +          echo "<th align=left>Configuration</th>" >> results.txt | 
|  | 86 | +          for r in Code Stack Structs Coverage | 
|  | 87 | +          do | 
|  | 88 | +            echo "<th align=right>$r</th>" >> results.txt | 
|  | 89 | +          done | 
|  | 90 | +          echo "</tr>" >> results.txt | 
|  | 91 | +          echo "</thead>" >> results.txt | 
|  | 92 | +
 | 
|  | 93 | +          echo "<tbody>" >> results.txt | 
|  | 94 | +          for c in "" readonly threadsafe migrate error-asserts | 
|  | 95 | +          do | 
|  | 96 | +            echo "<tr>" >> results.txt | 
|  | 97 | +            c_or_default=${c:-default} | 
|  | 98 | +            echo "<td align=left>${c_or_default^}</td>" >> results.txt | 
|  | 99 | +            for r in code stack structs | 
|  | 100 | +            do | 
|  | 101 | +              # per-config results | 
|  | 102 | +              echo "<td align=right>" >> results.txt | 
|  | 103 | +              [ -e results/thumb${c:+-$c}.csv ] && ( \ | 
|  | 104 | +                export PREV="$(jq -re ' | 
|  | 105 | +                      select(.context == "'"results (thumb${c:+, $c}) / $r"'").description | 
|  | 106 | +                      | capture("(?<result>[0-9∞]+)").result' \ | 
|  | 107 | +                    prev-results.json || echo 0)" | 
|  | 108 | +                ./scripts/summary.py results/thumb${c:+-$c}.csv -f $r -Y | awk ' | 
|  | 109 | +                  NR==2 {printf "%s B",$2} | 
|  | 110 | +                  NR==2 && ENVIRON["PREV"]+0 != 0 { | 
|  | 111 | +                    printf " (%+.1f%%)",100*($2-ENVIRON["PREV"])/ENVIRON["PREV"]} | 
|  | 112 | +                  NR==2 {printf "\n"}' \ | 
|  | 113 | +                | sed -e 's/ /\ /g' \ | 
|  | 114 | +                >> results.txt) | 
|  | 115 | +              echo "</td>" >> results.txt | 
|  | 116 | +            done | 
|  | 117 | +            # coverage results | 
|  | 118 | +            if [ -z $c ] | 
|  | 119 | +            then | 
|  | 120 | +              echo "<td rowspan=0 align=right>" >> results.txt | 
|  | 121 | +              [ -e results/coverage.csv ] && ( \ | 
|  | 122 | +                export PREV="$(jq -re ' | 
|  | 123 | +                      select(.context == "results / coverage").description | 
|  | 124 | +                      | capture("(?<result>[0-9\\.]+)").result' \ | 
|  | 125 | +                    prev-results.json || echo 0)" | 
|  | 126 | +                ./scripts/coverage.py -u results/coverage.csv -Y | awk -F '[ /%]+' ' | 
|  | 127 | +                  NR==2 {printf "%.1f%% of %d lines",$4,$3} | 
|  | 128 | +                  NR==2 && ENVIRON["PREV"]+0 != 0 { | 
|  | 129 | +                    printf " (%+.1f%%)",$4-ENVIRON["PREV"]} | 
|  | 130 | +                  NR==2 {printf "\n"}' \ | 
|  | 131 | +                | sed -e 's/ /\ /g' \ | 
|  | 132 | +                >> results.txt) | 
|  | 133 | +              echo "</td>" >> results.txt | 
|  | 134 | +            fi | 
|  | 135 | +            echo "</tr>" >> results.txt | 
|  | 136 | +          done | 
|  | 137 | +          echo "</tbody>" >> results.txt | 
|  | 138 | +          echo "</table>" >> results.txt | 
|  | 139 | +
 | 
| 159 | 140 |           cat results.txt | 
| 160 | 141 | 
 | 
| 161 | 142 |       # find changes from history | 
|  | 
0 commit comments