diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f157d1e..fdb49279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,17 +52,22 @@ jobs: BINARY_SIZE=$(ls -l ./target/release/transform | awk '{print $5}') echo "BINARY_SIZE=$BINARY_SIZE" >> $GITHUB_OUTPUT + - name: Fix Permission Loss + run: | + tar czf transform.tar ./target/release/transform + tar czf transform_all.tar ./target/release/transform_all + - uses: actions/upload-artifact@v4 with: if-no-files-found: error name: transform - path: ./target/release/transform + path: transform.tar - uses: actions/upload-artifact@v4 with: if-no-files-found: error name: transform_all - path: ./target/release/transform_all + path: transform_all.tar # checkout: # name: Read repos.json @@ -98,9 +103,6 @@ jobs: # with: # name: transform_all - # - name: chmod +x transform_all - # run: chmod +x ./transform_all - # - name: Transform # run: ./transform_all ${{ matrix.transform_directories }} @@ -180,9 +182,10 @@ jobs: - uses: actions/download-artifact@v4 with: name: transform + path: . - - run: chmod 777 ./transform - run: curl https://raw.githubusercontent.com/oxc-project/benchmark-files/main/cal.com.tsx > cal.com.tsx + - run: ls -lh # - name: Duration # id: duration @@ -190,15 +193,15 @@ jobs: # FILE="./cal.com.tsx" # hyperfine -i --warmup 10 --export-json output.json "./transform $FILE" # DURATION=$(jq '.results[0].mean' output.json) + # echo $DURATION # echo "DURATION=$DURATION" >> $GITHUB_OUTPUT - name: Max RSS id: rss run: | - FILE="./cal.com.tsx" - /usr/bin/time -l ./transform $FILE + FILE="./target/cal.com.tsx" hyperfine --warmup 10 --show-output \ - "/usr/bin/time -l ./target/release/transform $FILE > /dev/null" 2>&1 | \ + "/usr/bin/time -l ./target/release/transform $FILE" 2>&1 | \ grep "maximum resident set size" | \ awk '{ print $1 }' \ > output @@ -208,22 +211,26 @@ jobs: TOTAL=$(awk '{ total += $1 } END { print total }' output) COUNT=$(wc -l output | awk '{ print $1 }') AVERAGE=$(echo "$TOTAL $COUNT" | awk '{printf "%.1f", $1 / $2}') + echo $AVERAGE echo "RSS=$AVERAGE" >> $GITHUB_OUTPUT - # - name: Cycles Elapsed - # id: cycles - # run: | - # FILE="./cal.com.tsx" - # hyperfine --warmup 10 --show-output \ - # "/usr/bin/time -l ./transform $FILE > /dev/null" 2>&1 | \ - # grep "cycles elapsed" | \ - # awk '{ print $1 }' \ - # > output - - # TOTAL=$(awk '{ total += $1 } END { print total }' output) - # COUNT=$(wc -l output | awk '{ print $1 }') - # AVERAGE=$(echo "$TOTAL $COUNT" | awk '{printf "%.1f", $1 / $2}') - # echo "CYCLES=$AVERAGE" >> $GITHUB_OUTPUT + - name: Cycles Elapsed + id: cycles + run: | + FILE="./cal.com.tsx" + hyperfine --warmup 10 --show-output \ + "/usr/bin/time -l ./transform $FILE > /dev/null" 2>&1 | \ + grep "cycles elapsed" | \ + awk '{ print $1 }' \ + > output + + cat output + + TOTAL=$(awk '{ total += $1 } END { print total }' output) + COUNT=$(wc -l output | awk '{ print $1 }') + AVERAGE=$(echo "$TOTAL $COUNT" | awk '{printf "%.1f", $1 / $2}') + echo $AVERAGE + echo "CYCLES=$AVERAGE" >> $GITHUB_OUTPUT # - name: Create Data # run: |