Skip to content

Commit 49e4aae

Browse files
authored
Merge pull request #3 from luoliwoshang/llcppg/dep
chore:pkg origin; ci:llgo install
2 parents ffbdabf + 7bcd416 commit 49e4aae

File tree

26 files changed

+81
-49
lines changed

26 files changed

+81
-49
lines changed

.github/workflows/go.yml

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ name: Go
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: [ "**" ]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: [ "**" ]
1111

1212
jobs:
1313

14-
build:
15-
runs-on: ubuntu-latest
14+
test:
15+
strategy:
16+
matrix:
17+
os:
18+
- macos-latest
19+
- ubuntu-24.04
20+
llvm: [18]
21+
runs-on: ${{matrix.os}}
1622
steps:
1723
- uses: actions/checkout@v4
1824

@@ -21,11 +27,37 @@ jobs:
2127
with:
2228
go-version: '1.20'
2329

30+
- name: Install dependencies
31+
if: startsWith(matrix.os, 'macos')
32+
run: |
33+
brew update
34+
brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi
35+
brew link --force libffi
36+
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH
37+
38+
# llcppg dependencies
39+
brew install cjson
40+
41+
- name: Install dependencies
42+
if: startsWith(matrix.os, 'ubuntu')
43+
run: |
44+
echo "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${{matrix.llvm}} main" | sudo tee /etc/apt/sources.list.d/llvm.list
45+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
46+
sudo apt-get update
47+
sudo apt-get install -y llvm-${{matrix.llvm}}-dev clang-${{matrix.llvm}} libclang-${{matrix.llvm}}-dev lld-${{matrix.llvm}} pkg-config libgc-dev libssl-dev zlib1g-dev libffi-dev libcjson-dev
48+
echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH
49+
50+
- name: Install LLGO
51+
run: |
52+
go install github.com/goplus/llgo/cmd/llgo@main
53+
2454
- name: Build
2555
run: go build -v ./...
2656

57+
- name: Install llcppg dependencies
58+
run: bash .github/workflows/install_llcppg_depend.sh
59+
2760
- name: Test
2861
run: go test -v ./...
2962

30-
# - name: Install llcppg dependencies
31-
# run: bash .github/workflows/install_llcppg_depend.sh
63+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
set -e
33

4-
llgo install ./chore/_xtool/llcppsymg
5-
llgo install ./chore/_xtool/llcppsigfetch
6-
go install ./chore/gogensig
4+
llgo install ./_xtool/llcppsymg
5+
llgo install ./_xtool/llcppsigfetch
6+
go install ./cmd/gogensig

_xtool/llcppsigfetch/parse/cvt_test/cvt.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package cvttest
33
import (
44
"fmt"
55

6+
"github.com/goplus/llcppg/_xtool/llcppsigfetch/parse"
7+
"github.com/goplus/llcppg/_xtool/llcppsymg/clangutils"
68
"github.com/goplus/llgo/c"
79
"github.com/goplus/llgo/c/cjson"
810
"github.com/goplus/llgo/c/clang"
9-
"github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse"
10-
"github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils"
1111
)
1212

1313
func RunTest(testName string, testCases []string) {

_xtool/llcppsigfetch/parse/cvt_test/decl_test/class_test/class.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestClassDecl()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/comment_test/comment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestDoc()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/enum_test/enum.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestEnumDecl()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/func_test/func.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestFuncDecl()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/scope_test/scope.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestScope()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/struct_test/struct.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestStructDecl()

_xtool/llcppsigfetch/parse/cvt_test/decl_test/typedef_test/typedef.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package main
22

3-
import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test"
3+
import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test"
44

55
func main() {
66
TestTypeDefDecl()

0 commit comments

Comments
 (0)