Skip to content

Commit

Permalink
chore: 🤖 disable ci
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Jul 17, 2024
1 parent f564366 commit 56e1d30
Showing 1 changed file with 81 additions and 81 deletions.
162 changes: 81 additions & 81 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
name: Metric and Commit Results

on:
workflow_dispatch: # Allows manual triggering of the workflow
push:
branches:
- main
paths-ignore:
- '**/*.md'

jobs:
compile-time-and-binary-size:
name: Compile Time and Binary size
runs-on: ubuntu-latest
# if: ${{ github.ref_name == 'main' }}
outputs:
time: ${{ steps.run.outputs.COMPILE_TIME }}
binary_size: ${{ steps.run.outputs.BINARY_SIZE }}
steps:
- uses: taiki-e/checkout-action@v1
- name: Checkout repo
uses: actions/checkout@v4
- uses: Boshen/setup-rust@main
- run: |
cargo fetch
cargo clean # build from scatch using local system cache to avoid download from crates.io
- id: run
run: |
/usr/bin/time -f "%e" -o output cargo build --release
cat output
COMPILE_TIME=$(cat output)
echo $COMPILE_TIME
echo "COMPILE_TIME=$COMPILE_TIME" >> $GITHUB_OUTPUT
BINARY_SIZE=$(ls -l ./target/release/librolldown_binding.so | awk '{print $5}')
BINARY_SIZE=$(ls -l ./target/release/testcase | awk '{print $5}')
echo $BINARY_SIZE
echo "BINARY_SIZE=$BINARY_SIZE" >> $GITHUB_OUTPUT
echo $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
metric:
name: Metric
needs: [compile-time-and-binary-size]
runs-on: ubuntu-latest
steps:
- name: Checkout rolldown metric repository
uses: actions/checkout@v4
with:
repository: 'rolldown/metric'
ref: 'main'
token: ${{ secrets.METRIC_SECRET_KEY }}

- name: Setup Pnpm
uses: pnpm/action-setup@v2
with:
version: 8.10.5

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20' # Specify the Node.js version you need
cache: 'pnpm'

- name: Install dependencies and push metric
run: |
pnpm install -r
node ./scripts/compile-time-and-binary-size.mjs
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add metric.json
git commit -m "Update benchmark results"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPILE_TIME: ${{ needs.compile-time-and-binary-size.outputs.time }}
COMMIT_HASH: ${{ github.sha }}
GIT_REPOSITORY_URL: ${{ github.repository }}
BINARY_SIZE: ${{ needs.compile-time-and-binary-size.outputs.binary_size }}

# name: Metric and Commit Results
#
# on:
# workflow_dispatch: # Allows manual triggering of the workflow
# push:
# branches:
# - main
# paths-ignore:
# - '**/*.md'
#
# jobs:
# compile-time-and-binary-size:
# name: Compile Time and Binary size
# runs-on: ubuntu-latest
# # if: ${{ github.ref_name == 'main' }}
# outputs:
# time: ${{ steps.run.outputs.COMPILE_TIME }}
# binary_size: ${{ steps.run.outputs.BINARY_SIZE }}
# steps:
# - uses: taiki-e/checkout-action@v1
# - name: Checkout repo
# uses: actions/checkout@v4
# - uses: Boshen/setup-rust@main
# - run: |
# cargo fetch
# cargo clean # build from scatch using local system cache to avoid download from crates.io
# - id: run
# run: |
# /usr/bin/time -f "%e" -o output cargo build --release
# cat output
# COMPILE_TIME=$(cat output)
# echo $COMPILE_TIME
# echo "COMPILE_TIME=$COMPILE_TIME" >> $GITHUB_OUTPUT
#
# BINARY_SIZE=$(ls -l ./target/release/librolldown_binding.so | awk '{print $5}')
# BINARY_SIZE=$(ls -l ./target/release/testcase | awk '{print $5}')
# echo $BINARY_SIZE
# echo "BINARY_SIZE=$BINARY_SIZE" >> $GITHUB_OUTPUT
# echo $GITHUB_OUTPUT
# cat $GITHUB_OUTPUT
#
# metric:
# name: Metric
# needs: [compile-time-and-binary-size]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout rolldown metric repository
# uses: actions/checkout@v4
# with:
# repository: 'rolldown/metric'
# ref: 'main'
# token: ${{ secrets.METRIC_SECRET_KEY }}
#
# - name: Setup Pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8.10.5
#
# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20' # Specify the Node.js version you need
# cache: 'pnpm'
#
# - name: Install dependencies and push metric
# run: |
# pnpm install -r
# node ./scripts/compile-time-and-binary-size.mjs
# git config --global user.name 'github-actions[bot]'
# git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# git add metric.json
# git commit -m "Update benchmark results"
# git push
#
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COMPILE_TIME: ${{ needs.compile-time-and-binary-size.outputs.time }}
# COMMIT_HASH: ${{ github.sha }}
# GIT_REPOSITORY_URL: ${{ github.repository }}
# BINARY_SIZE: ${{ needs.compile-time-and-binary-size.outputs.binary_size }}
#

0 comments on commit 56e1d30

Please sign in to comment.