From 4393b90d2df64ff3080219fa0cb14172bd335de3 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 20:25:46 +0800 Subject: [PATCH 1/6] deps:update to llgo@lastest --- go.mod | 4 +--- go.sum | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 5c38865..6222076 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,4 @@ module github.com/goplus/llcppg go 1.20 -require ( - github.com/goplus/llgo v0.9.7 -) +require github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589 diff --git a/go.sum b/go.sum index 12bc27f..785fca0 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,4 @@ github.com/goplus/llgo v0.9.7 h1:LRF2Fq9ts4QrVxOPZufexalbIoJ1oiBERjCWQ45wxbg= github.com/goplus/llgo v0.9.7/go.mod h1:5Fs+08NslqofJ7xtOiIXugkurYOoQvY02ZkFNWA1uEI= +github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589 h1:u0aqHCN6z+Md1FYB052ROjP/6PVlFBtWWuTi/LGuifs= +github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY= From 7824afc074b83ad4ca60ba4c0042be9071994e8e Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 20:38:10 +0800 Subject: [PATCH 2/6] llcppsymg:change pkg origin with ci --- .github/workflows/go.yml | 4 ++-- .github/workflows/install_llcppg_depend.sh | 6 +++--- _xtool/llcppsymg/_cmptest/args_test/args.go | 2 +- .../llcppsymg/_cmptest/clangutils_test/clangutils.go | 2 +- _xtool/llcppsymg/_cmptest/config_test/config.go | 4 ++-- _xtool/llcppsymg/_cmptest/parse_test/parse.go | 2 +- _xtool/llcppsymg/_cmptest/symbol_test/symbol.go | 6 +++--- _xtool/llcppsymg/_cmptest/symg_test/symg.go | 4 ++-- _xtool/llcppsymg/config/config.go | 2 +- _xtool/llcppsymg/llcppsymg.go | 10 +++++----- _xtool/llcppsymg/parse/parse.go | 2 +- _xtool/llcppsymg/symbol/symbol.go | 8 ++++---- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6d5d9cc..95ac3c6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -27,5 +27,5 @@ jobs: - name: Test run: go test -v ./... - # - name: Install llcppg dependencies - # run: bash .github/workflows/install_llcppg_depend.sh + - name: Install llcppg dependencies + run: bash .github/workflows/install_llcppg_depend.sh diff --git a/.github/workflows/install_llcppg_depend.sh b/.github/workflows/install_llcppg_depend.sh index ca98863..2e64ec5 100644 --- a/.github/workflows/install_llcppg_depend.sh +++ b/.github/workflows/install_llcppg_depend.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -llgo install ./chore/_xtool/llcppsymg -llgo install ./chore/_xtool/llcppsigfetch -go install ./chore/gogensig +llgo install ./_xtool/llcppsymg +# llgo install ./chore/_xtool/llcppsigfetch +go install ./cmd/gogensig diff --git a/_xtool/llcppsymg/_cmptest/args_test/args.go b/_xtool/llcppsymg/_cmptest/args_test/args.go index 76dcf7a..74b9494 100644 --- a/_xtool/llcppsymg/_cmptest/args_test/args.go +++ b/_xtool/llcppsymg/_cmptest/args_test/args.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/args" + "github.com/goplus/llcppg/_xtool/llcppsymg/args" ) func main() { diff --git a/_xtool/llcppsymg/_cmptest/clangutils_test/clangutils.go b/_xtool/llcppsymg/_cmptest/clangutils_test/clangutils.go index 1dd0678..80816b5 100644 --- a/_xtool/llcppsymg/_cmptest/clangutils_test/clangutils.go +++ b/_xtool/llcppsymg/_cmptest/clangutils_test/clangutils.go @@ -4,9 +4,9 @@ import ( "fmt" "os" + "github.com/goplus/llcppg/_xtool/llcppsymg/clangutils" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/clang" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils" ) func main() { diff --git a/_xtool/llcppsymg/_cmptest/config_test/config.go b/_xtool/llcppsymg/_cmptest/config_test/config.go index 4b3bdbc..e095d41 100644 --- a/_xtool/llcppsymg/_cmptest/config_test/config.go +++ b/_xtool/llcppsymg/_cmptest/config_test/config.go @@ -7,8 +7,8 @@ import ( "runtime" "strings" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config/cfgparse" + "github.com/goplus/llcppg/_xtool/llcppsymg/config" + "github.com/goplus/llcppg/_xtool/llcppsymg/config/cfgparse" ) func main() { diff --git a/_xtool/llcppsymg/_cmptest/parse_test/parse.go b/_xtool/llcppsymg/_cmptest/parse_test/parse.go index 4a827b4..fcf0f30 100644 --- a/_xtool/llcppsymg/_cmptest/parse_test/parse.go +++ b/_xtool/llcppsymg/_cmptest/parse_test/parse.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/parse" + "github.com/goplus/llcppg/_xtool/llcppsymg/parse" ) func main() { diff --git a/_xtool/llcppsymg/_cmptest/symbol_test/symbol.go b/_xtool/llcppsymg/_cmptest/symbol_test/symbol.go index 929921c..bbcf8c9 100644 --- a/_xtool/llcppsymg/_cmptest/symbol_test/symbol.go +++ b/_xtool/llcppsymg/_cmptest/symbol_test/symbol.go @@ -5,9 +5,9 @@ import ( "os" "sort" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/parse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/symbol" - "github.com/goplus/llgo/chore/llcppg/types" + "github.com/goplus/llcppg/_xtool/llcppsymg/parse" + "github.com/goplus/llcppg/_xtool/llcppsymg/symbol" + "github.com/goplus/llcppg/types" "github.com/goplus/llgo/xtool/nm" ) diff --git a/_xtool/llcppsymg/_cmptest/symg_test/symg.go b/_xtool/llcppsymg/_cmptest/symg_test/symg.go index ef90ca0..a0147e8 100644 --- a/_xtool/llcppsymg/_cmptest/symg_test/symg.go +++ b/_xtool/llcppsymg/_cmptest/symg_test/symg.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/parse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/symbol" + "github.com/goplus/llcppg/_xtool/llcppsymg/parse" + "github.com/goplus/llcppg/_xtool/llcppsymg/symbol" "github.com/goplus/llgo/xtool/nm" ) diff --git a/_xtool/llcppsymg/config/config.go b/_xtool/llcppsymg/config/config.go index 3f268a0..fe7a745 100644 --- a/_xtool/llcppsymg/config/config.go +++ b/_xtool/llcppsymg/config/config.go @@ -4,9 +4,9 @@ import ( "errors" "unsafe" + "github.com/goplus/llcppg/types" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/cjson" - "github.com/goplus/llgo/chore/llcppg/types" ) type Conf struct { diff --git a/_xtool/llcppsymg/llcppsymg.go b/_xtool/llcppsymg/llcppsymg.go index 63ca3d4..c1050bc 100644 --- a/_xtool/llcppsymg/llcppsymg.go +++ b/_xtool/llcppsymg/llcppsymg.go @@ -21,11 +21,11 @@ import ( "io" "os" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/args" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config/cfgparse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/parse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/symbol" + "github.com/goplus/llcppg/_xtool/llcppsymg/args" + "github.com/goplus/llcppg/_xtool/llcppsymg/config" + "github.com/goplus/llcppg/_xtool/llcppsymg/config/cfgparse" + "github.com/goplus/llcppg/_xtool/llcppsymg/parse" + "github.com/goplus/llcppg/_xtool/llcppsymg/symbol" ) func main() { diff --git a/_xtool/llcppsymg/parse/parse.go b/_xtool/llcppsymg/parse/parse.go index b6d7072..cd4d3fb 100644 --- a/_xtool/llcppsymg/parse/parse.go +++ b/_xtool/llcppsymg/parse/parse.go @@ -6,9 +6,9 @@ import ( "strconv" "strings" + "github.com/goplus/llcppg/_xtool/llcppsymg/clangutils" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/clang" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils" ) type SymbolInfo struct { diff --git a/_xtool/llcppsymg/symbol/symbol.go b/_xtool/llcppsymg/symbol/symbol.go index a6b360a..c408ab1 100644 --- a/_xtool/llcppsymg/symbol/symbol.go +++ b/_xtool/llcppsymg/symbol/symbol.go @@ -8,12 +8,12 @@ import ( "strings" "unsafe" + "github.com/goplus/llcppg/_xtool/llcppsymg/config" + "github.com/goplus/llcppg/_xtool/llcppsymg/config/cfgparse" + "github.com/goplus/llcppg/_xtool/llcppsymg/parse" + "github.com/goplus/llcppg/types" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/cjson" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/config/cfgparse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/parse" - "github.com/goplus/llgo/chore/llcppg/types" "github.com/goplus/llgo/xtool/nm" ) From a4f8c146d1843cd7b66d5cf1ccb5355a6766fbb5 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 20:45:42 +0800 Subject: [PATCH 3/6] ci:all branch trigger --- .github/workflows/go.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 95ac3c6..7a7c255 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,9 +5,9 @@ name: Go on: push: - branches: [ "main" ] + branches: [ "**" ] pull_request: - branches: [ "main" ] + branches: [ "**" ] jobs: From a00fe7fba45f5384879f15a63914a5d75fb1d9fe Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 20:58:06 +0800 Subject: [PATCH 4/6] llcppsigfetch:change pkg origin with ci --- .github/workflows/install_llcppg_depend.sh | 2 +- _xtool/llcppsigfetch/parse/cvt_test/cvt.go | 4 ++-- .../parse/cvt_test/decl_test/class_test/class.go | 2 +- .../parse/cvt_test/decl_test/comment_test/comment.go | 2 +- .../parse/cvt_test/decl_test/enum_test/enum.go | 2 +- .../parse/cvt_test/decl_test/func_test/func.go | 2 +- .../parse/cvt_test/decl_test/scope_test/scope.go | 2 +- .../parse/cvt_test/decl_test/struct_test/struct.go | 2 +- .../parse/cvt_test/decl_test/typedef_test/typedef.go | 2 +- .../parse/cvt_test/decl_test/union_test/union.go | 2 +- .../parse/cvt_test/preprocess_test/preprocess.go | 4 ++-- _xtool/llcppsigfetch/parse/cvt_test/type_test/type.go | 6 +++--- _xtool/llcppsigfetch/parse/parse.go | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/install_llcppg_depend.sh b/.github/workflows/install_llcppg_depend.sh index 2e64ec5..9f40f37 100644 --- a/.github/workflows/install_llcppg_depend.sh +++ b/.github/workflows/install_llcppg_depend.sh @@ -2,5 +2,5 @@ set -e llgo install ./_xtool/llcppsymg -# llgo install ./chore/_xtool/llcppsigfetch +llgo install ./_xtool/llcppsigfetch go install ./cmd/gogensig diff --git a/_xtool/llcppsigfetch/parse/cvt_test/cvt.go b/_xtool/llcppsigfetch/parse/cvt_test/cvt.go index 62fe949..b46d457 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/cvt.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/cvt.go @@ -3,11 +3,11 @@ package cvttest import ( "fmt" + "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse" + "github.com/goplus/llcppg/_xtool/llcppsymg/clangutils" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/cjson" "github.com/goplus/llgo/c/clang" - "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils" ) func RunTest(testName string, testCases []string) { diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/class_test/class.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/class_test/class.go index fd2d384..03a148b 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/class_test/class.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/class_test/class.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestClassDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/comment_test/comment.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/comment_test/comment.go index 0747e14..eda759c 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/comment_test/comment.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/comment_test/comment.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestDoc() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/enum_test/enum.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/enum_test/enum.go index 31e3be9..d85dd0f 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/enum_test/enum.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/enum_test/enum.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestEnumDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/func_test/func.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/func_test/func.go index f2e18e1..08aa1a8 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/func_test/func.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/func_test/func.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestFuncDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/scope_test/scope.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/scope_test/scope.go index 29332bf..654f55c 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/scope_test/scope.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/scope_test/scope.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestScope() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/struct_test/struct.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/struct_test/struct.go index 39d40d8..a5b3667 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/struct_test/struct.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/struct_test/struct.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestStructDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/typedef_test/typedef.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/typedef_test/typedef.go index c370c7c..9e75d8e 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/typedef_test/typedef.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/typedef_test/typedef.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestTypeDefDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/union_test/union.go b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/union_test/union.go index c963feb..32adfbc 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/decl_test/union_test/union.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/decl_test/union_test/union.go @@ -1,6 +1,6 @@ package main -import test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" +import test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" func main() { TestUnionDecl() diff --git a/_xtool/llcppsigfetch/parse/cvt_test/preprocess_test/preprocess.go b/_xtool/llcppsigfetch/parse/cvt_test/preprocess_test/preprocess.go index f702b6a..7457a25 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/preprocess_test/preprocess.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/preprocess_test/preprocess.go @@ -1,9 +1,9 @@ package main import ( + test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" + "github.com/goplus/llcppg/_xtool/llcppsymg/clangutils" "github.com/goplus/llgo/c" - test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" - "github.com/goplus/llgo/chore/_xtool/llcppsymg/clangutils" ) func main() { diff --git a/_xtool/llcppsigfetch/parse/cvt_test/type_test/type.go b/_xtool/llcppsigfetch/parse/cvt_test/type_test/type.go index 76fef62..75d1ef7 100644 --- a/_xtool/llcppsigfetch/parse/cvt_test/type_test/type.go +++ b/_xtool/llcppsigfetch/parse/cvt_test/type_test/type.go @@ -4,12 +4,12 @@ import ( "fmt" "os" + "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse" + test "github.com/goplus/llcppg/_xtool/llcppsigfetch/parse/cvt_test" + "github.com/goplus/llcppg/ast" "github.com/goplus/llgo/c" "github.com/goplus/llgo/c/cjson" "github.com/goplus/llgo/c/clang" - "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse" - test "github.com/goplus/llgo/chore/_xtool/llcppsigfetch/parse/cvt_test" - "github.com/goplus/llgo/chore/llcppg/ast" ) func main() { diff --git a/_xtool/llcppsigfetch/parse/parse.go b/_xtool/llcppsigfetch/parse/parse.go index 642f21a..7507ed8 100644 --- a/_xtool/llcppsigfetch/parse/parse.go +++ b/_xtool/llcppsigfetch/parse/parse.go @@ -5,8 +5,8 @@ import ( "fmt" "os" - "github.com/goplus/llgo/c/cjson" "github.com/goplus/llcppg/_xtool/llcppsymg/clangutils" + "github.com/goplus/llgo/c/cjson" ) type dbgFlags = int From e9469ba21c2932e3bfe6a7700bfeb33944570a99 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 21:02:40 +0800 Subject: [PATCH 5/6] ci:macos llgo install --- .github/workflows/go.yml | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7a7c255..12953e9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -11,8 +11,13 @@ on: jobs: - build: - runs-on: ubuntu-latest + test: + strategy: + matrix: + os: + - macos-latest + llvm: [18] + runs-on: ${{matrix.os}} steps: - uses: actions/checkout@v4 @@ -21,11 +26,28 @@ jobs: with: go-version: '1.20' + - name: Install dependencies + if: startsWith(matrix.os, 'macos') + run: | + brew update + brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi + brew link --force libffi + echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH + + # llcppg dependencies + brew install cjson + + - name: Install LLGO + run: | + go install github.com/goplus/llgo/cmd/llgo@main + - name: Build run: go build -v ./... + - name: Install llcppg dependencies + run: bash .github/workflows/install_llcppg_depend.sh + - name: Test run: go test -v ./... - - name: Install llcppg dependencies - run: bash .github/workflows/install_llcppg_depend.sh + From 7bcd41658c30e4af2a98c812318e6aa8211c5af7 Mon Sep 17 00:00:00 2001 From: luoliwoshang <2643523683@qq.com> Date: Wed, 27 Nov 2024 22:49:36 +0800 Subject: [PATCH 6/6] ci:linux install llgo --- .github/workflows/go.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 12953e9..0f9433e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -16,6 +16,7 @@ jobs: matrix: os: - macos-latest + - ubuntu-24.04 llvm: [18] runs-on: ${{matrix.os}} steps: @@ -37,6 +38,15 @@ jobs: # llcppg dependencies brew install cjson + - name: Install dependencies + if: startsWith(matrix.os, 'ubuntu') + run: | + 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 + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - + sudo apt-get update + 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 + echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH + - name: Install LLGO run: | go install github.com/goplus/llgo/cmd/llgo@main