Skip to content

ci: add performance compare #3

ci: add performance compare

ci: add performance compare #3

name: Performance comparison
on:
workflow_dispatch:
# TODO: tmp
push:
jobs:
setup:
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Setup V
run: |
curl -LO https://github.com/vlang/v/releases/latest/download/v_linux.zip
unzip -o v_linux.zip
mv v ~/v
~/v/v symlink && v -showcc self && v doctor
- uses: actions/checkout@v4
with:
path: vibe
- name: Setup V module
run: |
mv vibe ~/.vmodules/vibe
~/.vmodules/vibe/curl/setup.vsh --silent
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
~/v
~/.vmodules
key: ${{ matrix.os }}-${{ github.sha }}
test:
needs: setup
strategy:
matrix:
os: [ubuntu-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ${{ matrix.os }}-${{ github.sha }}
fail-on-cache-miss: true
- name: Setup V
run: ~/v/v symlink
- name: Run comparison
run: |
v -cc -gcc -prod -o pc .github/workflows/performance_compare.v
pc -r 25 --single-host
pc -r 25 --single-host --use-vibe
pc -r 50 --single-host
pc -r 50 --single-host --use-vibe
pc -r 25
pc -r 25 --use-vibe
pc -r 50
pc -r 50 --use-vibe