Skip to content

Commit e0303b2

Browse files
authored
ci: add compile_herolib.sh, use it to make sure it keeps working (related #23467) (#23469)
1 parent f83ea1b commit e0303b2

2 files changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
function show() {
6+
printf "\u001b[35m$1\u001b[0m\n"
7+
}
8+
9+
rm -rf herolib/
10+
11+
show "Clone https://github.com/freeflowuniverse/herolib"
12+
v retry -- git clone --filter=blob:none --quiet https://github.com/freeflowuniverse/herolib herolib
13+
cd herolib
14+
git checkout development
15+
16+
mkdir -p ~/.vmodules/freeflowuniverse
17+
ln -s $(pwd)/lib ~/.vmodules/freeflowuniverse/herolib
18+
cd cli
19+
20+
show "Checkout last known good commit"
21+
git checkout fa0dac57ec218c0d65e0e8d5bba45ba2fd28d3d7
22+
23+
v wipe-cache
24+
show "Build project no parallel (gcc)"
25+
v -cc gcc -cg -enable-globals -w -n hero.v
26+
show "Checking build"
27+
ls -l ./hero
28+
29+
v wipe-cache
30+
show "Build project no parallel (clang)"
31+
v -cc clang -cg -enable-globals -w -n hero.v
32+
show "Checking build"
33+
ls -l ./hero
34+
35+
v wipe-cache
36+
show "Build project with -parallel-cc (clang)"
37+
v -cc clang -cg -enable-globals -parallel-cc -w -n hero.v
38+
show "Checking gcc build"
39+
ls -l ./hero
40+
41+
v wipe-cache
42+
show "Build project with -parallel-cc (gcc)"
43+
v -cc gcc -cg -enable-globals -parallel-cc -w -n hero.v
44+
show "Checking clang build"
45+
ls -l ./hero
46+
47+
rm -rf ../../herolib

‎.github/workflows/v_apps_and_modules_compile_ci.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ jobs:
6666
- name: Test discord.v
6767
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
6868
run: .github/workflows/compile_discordv.sh
69+
- name: Build herolib
70+
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
71+
run: .github/workflows/compile_herolib.sh
6972
- name: Build vlang/vab
7073
if: ${{ !cancelled() && steps.build.outcome == 'success' }}
7174
run: |

0 commit comments

Comments
 (0)