-
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (80 loc) · 2.1 KB
/
performance_compare.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Performance comparison
on:
workflow_dispatch:
# TODO: remove
push:
jobs:
setup:
if: github.ref_name != 'main'
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
v_archive: v_macos_arm64.zip
- os: ubuntu-latest
v_archive: v_linux.zip
- os: ubuntu-latest
v_archive: v_windows.zip
fail-fast: false
defaults:
run:
shell: bash
steps:
- name: Setup V
run: |
curl -LO https://github.com/vlang/v/releases/latest/download/${{ matrix.v_archive }}
if [[ $RUNNER_OS == "Windows" ]]; then
7z x ${{ matrix.v_archive }}
else
unzip -o ${{ matrix.v_archive }}
fi
mv v ~/v
~/v/v symlink
- run: 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
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: |
~/v
~/.vmodules
key: ${{ matrix.os }}-${{ github.sha }}
fail-on-cache-miss: true
- uses: actions/checkout@v4
- 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