This repository was archived by the owner on Nov 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (96 loc) · 2.7 KB
/
benchmark.yml
File metadata and controls
112 lines (96 loc) · 2.7 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: benchmark
# TODO: fix and enable once it's done
on:
push:
branches: [ disable ]
pull_request:
branches: [ disable ]
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash
jobs:
benchmark:
name: benchmark ${{ matrix.build.target }}
runs-on: ${{ matrix.build.os }}
env:
TARGET: ${{ matrix.build.target }}
CC: ${{ matrix.build.cc }}
LD: ${{ matrix.build.ld }}
AR: ${{ matrix.build.ar }}
CFLAGS: ${{ matrix.build.cflags }}
RUSTFLAGS: ${{ matrix.build.rustflags }}
BUILD_ENV: release
strategy:
fail-fast: false
matrix:
build:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cc: clang-13
ld: ld.lld-13
ar: llvm-ar-13
cflags: -fuse-ld=lld-13
rustflags: -Clinker-plugin-lto -Clinker=clang-13 -Clink-arg=-fuse-ld=lld-13
run: |
# Install LLVM 13
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 13
which -a clang
which -a clang-13
# Run benchmarks
CFLAGS="$CFLAGS -flto=thin" make libruby_parser_c.a
make rebuild-static-lib
make benchmark/compare
- os: macos-latest
target: x86_64-apple-darwin
cc: clang
ld: ld
ar: ar
run: |
$CC --version
make benchmark/compare
- os: windows-latest
target: x86_64-pc-windows-msvc
cc: cl.exe
ld: link.exe
run: |
make do-codegen
make benchmark/compare
- os: windows-latest
target: x86_64-pc-windows-gnu
cc: gcc
ld: ld
ar: ar
run: |
gcc --version
make benchmark/compare
steps:
- name: setup msvc on windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.build.target }}
override: true
- name: install ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.1.1"
- name: print rustc detailed version
run: rustc --version --verbose
- name: checkout
uses: actions/checkout@v2
- name: codegen
env:
RUSTFLAGS: ""
run: cd codegen && cargo build
- name: download benchmark artifacts
run: make benchmark/download
- name: run benchmark
run: ${{ matrix.build.run }}