@@ -5,11 +5,12 @@ name: Go
55
66on :
77 push :
8- branches : ["**"]
8+ branches : [ "**" ]
99 pull_request :
10- branches : ["**"]
10+ branches : [ "**" ]
1111
1212jobs :
13+
1314 test :
1415 strategy :
1516 matrix :
@@ -22,62 +23,62 @@ jobs:
2223 fail-fast : false
2324 runs-on : ${{matrix.os}}
2425 steps :
25- - uses : actions/checkout@v5
26- - name : Setup llcppg environment
27- uses : ./.github/actions/setup-llcppg
28- with :
29- go : ${{ matrix.go }}
30- llvm : ${{ matrix.llvm }}
31- llgo : ${{ matrix.llgo }}
26+ - uses : actions/checkout@v5
27+ - name : Setup llcppg environment
28+ uses : ./.github/actions/setup-llcppg
29+ with :
30+ go : ${{ matrix.go }}
31+ llvm : ${{ matrix.llvm }}
32+ llgo : ${{ matrix.llgo }}
3233
33- - name : Setup Test Dependencies
34- if : startsWith(matrix.os, 'macos')
35- run : brew install cjson
34+ - name : Setup Test Dependencies
35+ if : startsWith(matrix.os, 'macos')
36+ run : brew install cjson
3637
37- - name : Setup Test Dependencies
38- if : startsWith(matrix.os, 'ubuntu')
39- run : sudo apt install libcjson-dev
38+ - name : Setup Test Dependencies
39+ if : startsWith(matrix.os, 'ubuntu')
40+ run : sudo apt install libcjson-dev
4041
41- # only can compile with llgo
42- - name : Test xtool
43- run : |
44- llgo test -abi=0 ./_xtool/internal/...
42+ # only can compile with llgo
43+ - name : Test xtool
44+ run : |
45+ llgo test -abi=0 ./_xtool/internal/...
4546
46- # only can compile with llgo
47- - name : Test llcppsymg & llcppsigfetch
48- run : |
49- llgo test -abi=0 ./_xtool/llcppsigfetch/internal/...
50- llgo test -abi=0 ./_xtool/llcppsymg/internal/...
47+ # only can compile with llgo
48+ - name : Test llcppsymg & llcppsigfetch
49+ run : |
50+ llgo test -abi=0 ./_xtool/llcppsigfetch/internal/...
51+ llgo test -abi=0 ./_xtool/llcppsymg/internal/...
5152
52- - name : Test For LLGo and Go
53- run : |
54- llgo test -abi=0 ./config
55- llgo test -abi=0 ./internal/arg
56- llgo test -abi=0 ./internal/name
53+ - name : Test For LLGo and Go
54+ run : |
55+ llgo test -abi=0 ./config
56+ llgo test -abi=0 ./internal/arg
57+ llgo test -abi=0 ./internal/name
5758
58- - name : Test
59- if : ${{!startsWith(matrix.os, 'macos')}}
60- run : go test -v ./...
59+ - name : Test
60+ if : ${{!startsWith(matrix.os, 'macos')}}
61+ run : go test -v ./...
6162
62- - name : Test with coverage
63- if : startsWith(matrix.os, 'macos')
64- run : go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
63+ - name : Test with coverage
64+ if : startsWith(matrix.os, 'macos')
65+ run : go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
6566
66- - name : Upload coverage reports to Codecov
67- uses : codecov/codecov-action@v5
68- with :
69- token : ${{secrets.CODECOV_TOKEN}}
70- slug : goplus/llcppg
67+ - name : Upload coverage reports to Codecov
68+ uses : codecov/codecov-action@v5
69+ with :
70+ token : ${{secrets.CODECOV_TOKEN}}
71+ slug : goplus/llcppg
7172
72- - name : Test demos
73- run : |
74- # TODO(lijie): force python3-embed to be linked with python-3.12-embed
75- # Currently, python3-embed is python-3.13-embed, doesn't work with pytorch
76- # Will remove this after pytorch is fixed.
77- pcdir=$HOME/pc
78- mkdir -p $pcdir
79- libdir=$(pkg-config --variable=libdir python-3.12-embed)
80- echo "libdir: $libdir"
81- ln -s $libdir/pkgconfig/python-3.12-embed.pc $pcdir/python3-embed.pc
82- export PKG_CONFIG_PATH=$pcdir
83- bash .github/workflows/test_demo.sh
73+ - name : Test demos
74+ run : |
75+ # TODO(lijie): force python3-embed to be linked with python-3.12-embed
76+ # Currently, python3-embed is python-3.13-embed, doesn't work with pytorch
77+ # Will remove this after pytorch is fixed.
78+ pcdir=$HOME/pc
79+ mkdir -p $pcdir
80+ libdir=$(pkg-config --variable=libdir python-3.12-embed)
81+ echo "libdir: $libdir"
82+ ln -s $libdir/pkgconfig/python-3.12-embed.pc $pcdir/python3-embed.pc
83+ export PKG_CONFIG_PATH=$pcdir
84+ bash .github/workflows/test_demo.sh
0 commit comments