Skip to content

Commit 66db103

Browse files
committed
fix compilation on linux (requires latest libgit2, which on some distros has to be installed in /usr/local)
1 parent 5a22181 commit 66db103

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
ubuntu:
6+
ubuntu-gcc:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout V
@@ -34,17 +34,17 @@ jobs:
3434
- name: Compile gitly
3535
run: |
3636
cd gitly
37-
v .
37+
v -cc gcc .
3838
3939
- name: Compile gitly with -autofree
4040
run: |
4141
cd gitly
42-
v -autofree .
42+
v -cc gcc -autofree .
4343
4444
- name: Compile gitly with -prod
4545
run: |
4646
cd gitly
47-
v -prod .
47+
v -cc gcc -prod .
4848
4949
- name: Compile CSS from SCSS files
5050
uses: gha-utilities/sass-build@v0.4.11
@@ -55,14 +55,14 @@ jobs:
5555
- name: Run all tests
5656
run: |
5757
cd gitly
58-
v -d use_openssl test .
58+
v -cc gcc -d use_openssl test .
5959
6060
- name: Run tests/first_run.v
6161
run: |
6262
cd gitly
63-
v -g run tests/first_run.v
63+
v -cc gcc -g run tests/first_run.v
6464
65-
macos:
65+
macos-clang:
6666
runs-on: macos-latest
6767
steps:
6868
- name: Checkout V
@@ -92,15 +92,15 @@ jobs:
9292
- name: Compile gitly
9393
run: |
9494
cd gitly
95-
v .
95+
v -cc clang .
9696
- name: Compile gitly with -autofree
9797
run: |
9898
cd gitly
99-
v -autofree .
99+
v -cc clang -autofree .
100100
- name: Compile gitly with -prod
101101
run: |
102102
cd gitly
103-
v -prod .
103+
v -cc clang -prod .
104104
- name: Compile CSS from SCSS files
105105
uses: gha-utilities/sass-build@v0.4.11
106106
with:
@@ -109,11 +109,11 @@ jobs:
109109
- name: Run all tests
110110
run: |
111111
cd gitly
112-
v -d use_openssl test .
112+
v -cc clang -d use_openssl test .
113113
- name: Run tests/first_run.v
114114
run: |
115115
cd gitly
116-
v -g run tests/first_run.v
116+
v -cc clang -g run tests/first_run.v
117117
118118
# windows-msvc:
119119
# runs-on: windows-latest
@@ -180,12 +180,12 @@ jobs:
180180
run: |
181181
./make.bat -gcc
182182
- name: Compile gitly
183-
run: .\v.exe gitly
183+
run: .\v.exe -cc gcc gitly
184184

185185
ubuntu-tcc:
186186
runs-on: ubuntu-latest
187187
env:
188-
VFLAGS: -cc tcc -cflags -bt10
188+
VFLAGS: -cc tcc -d no_backtrace -d no_segfault_handler
189189
steps:
190190
- name: Checkout V
191191
uses: actions/checkout@v3

git/libgit.v

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ module git
77
#flag darwin -I/opt/homebrew/include
88
#flag darwin -L/opt/homebrew/lib
99

10+
#flag linux -I/usr/local/include
11+
#flag linux -L/usr/local/lib
12+
1013
#flag -lgit2
1114

1215
#include "git2/types.h"
@@ -47,6 +50,7 @@ struct C.git_error {
4750

4851
[typedef]
4952
struct C.git_tree_entry {}
53+
5054
struct C.git_clone_options {
5155
mut:
5256
bare int

0 commit comments

Comments
 (0)