-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (136 loc) · 3.62 KB
/
ci.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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Do the thing in CI
on:
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
- assembly
- bun
- c-gcc
- c-clang
- cpp-gcc
- cpp-clang
- cobol
- coffeescript
- crystal
- deno
- erlang
- fortran
- go
- haskell
- java
- julia
- kotlin
- nim
- node
- pascal
- perl
- php
- prolog
- python3
- ruby
- rust
- scala
- smalltalk
# - tcl
- zig
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
target/
key: ${{ runner.os }}-cargo
- uses: actions/cache@v3
with:
path: scripts/node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
# install dependencies
- uses: extractions/setup-just@v1
- uses: oven-sh/setup-bun@v1
- uses: denoland/setup-deno@v1
with:
deno-version: "~1"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cargo \
clang \
coffeescript \
curl \
erlang \
fp-compiler \
gfortran \
gnu-smalltalk \
gnucobol4 \
haskell-platform \
jq kotlin \
moreutils \
nasm \
nodejs \
php \
rustc \
scala \
swi-prolog \
tar \
tcl \
wget \
xz-utils
cargo install timers
cargo install hyperfine
cargo install ripgrep --features 'pcre2'
cargo install juliaup
juliaup add release
wget -qO choosenim.sh https://nim-lang.org/choosenim/init.sh
bash ./choosenim.sh -y
echo "$HOME/.nimble/bin" >> $GITHUB_PATH
export PATH="$HOME/.nimble/bin:$PATH"
curl -fsSL https://crystal-lang.org/install.sh | sudo bash
mkdir -p /opt/zig && cd $_
wget --quiet -O zig.tar.xz $(curl --silent https://ziglang.org/download/index.json | jq -r '.[keys_unsorted[1]]["x86_64-linux"].tarball')
tar -xvf zig.tar.xz --strip-components=1 2>&1 >/dev/null
echo "/opt/zig" >> $GITHUB_PATH
export PATH="/opt/zig:$PATH"
cd -
# do the thing
- run: just measure ${{ matrix.build }}
# report
- uses: actions/upload-artifact@v3
with:
path: "${{ matrix.build }}.json"
report:
needs: ["run"]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Results
uses: actions/download-artifact@v3
with:
path: .
- run: sudo apt-get install nodejs
- name: Generate Summary
run: |
cd scripts
npm install
node ./summary.js --results ../artifact > summary.txt
cat summary.txt
- uses: actions/upload-artifact@v3
with:
path: scripts/summary.txt