-
Notifications
You must be signed in to change notification settings - Fork 309
135 lines (110 loc) · 3.31 KB
/
compile-check-run.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
name: Compile, Check & Run
on:
push:
branches:
- '**'
pull_request:
branches:
- main
jobs:
hello-world:
runs-on: macos-latest
steps:
- run: echo LOCAL ${{ env.LOCAL }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup LLVM
uses: ZhongRuoyu/setup-llvm@v0
with:
llvm-version: 17
- name: Setup GraalVM w/ native-image
uses: graalvm/setup-graalvm@v1
with:
java-version: '23'
distribution: 'graalvm-community'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@ac5052cad8ffe5039f26968da4b4a0ca88d00971
with:
cli: latest
bb: latest
no-auth: ${{ env.LOCAL == 'true' }}
- name: Setup Fortran
uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: '13'
# - name: Setup Haskell
# uses: haskell-actions/setup@v2
# - name: Setup zig
# uses: mlugg/setup-zig@v1
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Set up PyPy
uses: actions/setup-python@v5
with:
python-version: 'pypy3.10'
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.11.0'
- uses: oven-sh/setup-bun@v2
with:
bun-version: '1.1.34'
- name: Cache Homebrew
uses: actions/cache@v4
with:
path: |
/opt/Homebrew
/opt/Caskroom
key: ${{ runner.os }}-brew-${{ hashFiles('Brewfile') }}
restore-keys: |
${{ runner.os }}-brew-
- name: Brew Install hyperfine and various languages and tools
run: brew bundle --file=Brewfile
- name: Compile Hello World programs
run: |
cd hello-world
bash ../compile.sh
continue-on-error: true
- name: Run Hello World benchmarks
run: |
cd hello-world
bash ../run.sh
continue-on-error: true
## Compiling and checking all the benchmark sequentially takes a lot of time
## Trying to run them in parallell in different jobs runs into cache problems
## It takes a lot of time to restore the cache, and creating the large cache
## Sometimes fails.
# - name: Compile Loops programs
# run: |
# cd loops
# bash ../compile.sh
# continue-on-error: true
# - name: Check Loops programs
# run: |
# cd loops
# bash ../run.sh check
# continue-on-error: true
# - name: Compile Fibonacci programs
# run: |
# cd fibonacci
# bash ../compile.sh
# continue-on-error: true
# - name: Check Fibonacci programs
# run: |
# cd fibonacci
# bash ../run.sh check
# continue-on-error: true
# - name: Compile Levenshtein programs
# run: |
# cd levenshtein
# bash ../compile.sh
# continue-on-error: true
# - name: Check Levenshtein programs
# run: |
# cd levenshtein
# bash ../run.sh check
# continue-on-error: true