Skip to content

Commit

Permalink
fix compilation on linux (requires latest libgit2, which on some dist…
Browse files Browse the repository at this point in the history
…ros has to be installed in /usr/local)
  • Loading branch information
spytheman committed Nov 13, 2023
1 parent 5a22181 commit 66db103
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
ubuntu:
ubuntu-gcc:
runs-on: ubuntu-latest
steps:
- name: Checkout V
Expand Down Expand Up @@ -34,17 +34,17 @@ jobs:
- name: Compile gitly
run: |
cd gitly
v .
v -cc gcc .
- name: Compile gitly with -autofree
run: |
cd gitly
v -autofree .
v -cc gcc -autofree .
- name: Compile gitly with -prod
run: |
cd gitly
v -prod .
v -cc gcc -prod .
- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
Expand All @@ -55,14 +55,14 @@ jobs:
- name: Run all tests
run: |
cd gitly
v -d use_openssl test .
v -cc gcc -d use_openssl test .
- name: Run tests/first_run.v
run: |
cd gitly
v -g run tests/first_run.v
v -cc gcc -g run tests/first_run.v
macos:
macos-clang:
runs-on: macos-latest
steps:
- name: Checkout V
Expand Down Expand Up @@ -92,15 +92,15 @@ jobs:
- name: Compile gitly
run: |
cd gitly
v .
v -cc clang .
- name: Compile gitly with -autofree
run: |
cd gitly
v -autofree .
v -cc clang -autofree .
- name: Compile gitly with -prod
run: |
cd gitly
v -prod .
v -cc clang -prod .
- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
with:
Expand All @@ -109,11 +109,11 @@ jobs:
- name: Run all tests
run: |
cd gitly
v -d use_openssl test .
v -cc clang -d use_openssl test .
- name: Run tests/first_run.v
run: |
cd gitly
v -g run tests/first_run.v
v -cc clang -g run tests/first_run.v
# windows-msvc:
# runs-on: windows-latest
Expand Down Expand Up @@ -180,12 +180,12 @@ jobs:
run: |
./make.bat -gcc
- name: Compile gitly
run: .\v.exe gitly
run: .\v.exe -cc gcc gitly

ubuntu-tcc:
runs-on: ubuntu-latest
env:
VFLAGS: -cc tcc -cflags -bt10
VFLAGS: -cc tcc -d no_backtrace -d no_segfault_handler
steps:
- name: Checkout V
uses: actions/checkout@v3
Expand Down
4 changes: 4 additions & 0 deletions git/libgit.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ module git
#flag darwin -I/opt/homebrew/include
#flag darwin -L/opt/homebrew/lib

#flag linux -I/usr/local/include
#flag linux -L/usr/local/lib

#flag -lgit2

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

[typedef]
struct C.git_tree_entry {}

struct C.git_clone_options {
mut:
bare int
Expand Down

0 comments on commit 66db103

Please sign in to comment.