Skip to content

Commit 2227d0e

Browse files
committed
llgo:component -abi=0
1 parent e0fb166 commit 2227d0e

File tree

2 files changed

+55
-54
lines changed

2 files changed

+55
-54
lines changed

.github/workflows/go.yml

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ name: Go
55

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

1212
jobs:
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

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ go install -v ./cmd/llcppcfg
66
go install -v ./cmd/llcppgtest
77

88
# main process required
9-
llgo install ./_xtool/llcppsymg
10-
llgo install ./_xtool/llcppsigfetch
9+
llgo install -abi=0 ./_xtool/llcppsymg
10+
llgo install -abi=0 ./_xtool/llcppsigfetch
1111
go install -v ./cmd/gogensig
1212
go install -v ./cmd/llcppg

0 commit comments

Comments
 (0)