Skip to content

Commit cb4dc6e

Browse files
committed
deps:update llgo
1 parent ea06d9b commit cb4dc6e

File tree

3 files changed

+68
-66
lines changed

3 files changed

+68
-66
lines changed

.github/workflows/go.yml

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

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

1212
jobs:
13-
1413
test:
1514
strategy:
1615
matrix:
@@ -20,65 +19,64 @@ jobs:
2019
llvm: [18]
2120
runs-on: ${{matrix.os}}
2221
steps:
23-
- uses: actions/checkout@v4
24-
25-
- name: Set up Go
26-
uses: actions/setup-go@v4
27-
with:
28-
go-version: '1.20'
29-
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-
54-
- name: Build
55-
run: go build -v ./...
56-
57-
- name: Install llcppg dependencies
58-
run: bash .github/workflows/install_llcppg_depend.sh
59-
60-
- name: Test llcppsymg
61-
run: |
62-
llgo cmptest ./_xtool/llcppsigfetch/parse/cvt_test/...
63-
64-
# llgo cmptest ./_xtool/llcppsymg/_cmptest/... causes
65-
# panic: runtime error: index out of range [0] with length 0
66-
cd _xtool/llcppsymg/_cmptest
67-
llgo cmptest ./...
68-
cd ../../../
69-
70-
- name: Test
71-
if: ${{!startsWith(matrix.os, 'macos')}}
72-
run: go test -v ./...
73-
74-
- name: Test with coverage
75-
if: startsWith(matrix.os, 'macos')
76-
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
77-
78-
- name: Upload coverage reports to Codecov
79-
uses: codecov/codecov-action@v5
80-
with:
81-
token: ${{secrets.CODECOV_TOKEN}}
82-
slug: goplus/llcppg
83-
84-
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Go
25+
uses: actions/setup-go@v4
26+
with:
27+
go-version: "1.20"
28+
29+
- name: Install dependencies
30+
if: startsWith(matrix.os, 'macos')
31+
run: |
32+
brew update
33+
brew install llvm@${{matrix.llvm}} bdw-gc openssl libffi
34+
brew link --force libffi
35+
echo "$(brew --prefix llvm@${{matrix.llvm}})/bin" >> $GITHUB_PATH
36+
37+
# llcppg dependencies
38+
brew install cjson
39+
40+
- name: Install dependencies
41+
if: startsWith(matrix.os, 'ubuntu')
42+
run: |
43+
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
44+
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
45+
sudo apt-get update
46+
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
47+
echo "/usr/lib/llvm-${{matrix.llvm}}/bin" >> $GITHUB_PATH
48+
49+
- name: Install LLGO
50+
run: |
51+
# Temporarily use the last commit before the issue https://github.com/goplus/llgo/issues/897 appeared:
52+
go install github.com/goplus/llgo/cmd/llgo@7b6b8b0eeb84fb1fc9720fbb05e1c2b13600e0c1
53+
54+
- name: Build
55+
run: go build -v ./...
56+
57+
- name: Install llcppg dependencies
58+
run: bash .github/workflows/install_llcppg_depend.sh
59+
60+
- name: Test llcppsymg
61+
run: |
62+
llgo cmptest ./_xtool/llcppsigfetch/parse/cvt_test/...
63+
64+
# llgo cmptest ./_xtool/llcppsymg/_cmptest/... causes
65+
# panic: runtime error: index out of range [0] with length 0
66+
cd _xtool/llcppsymg/_cmptest
67+
llgo cmptest ./...
68+
cd ../../../
69+
70+
- name: Test
71+
if: ${{!startsWith(matrix.os, 'macos')}}
72+
run: go test -v ./...
73+
74+
- name: Test with coverage
75+
if: startsWith(matrix.os, 'macos')
76+
run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./...
77+
78+
- name: Upload coverage reports to Codecov
79+
uses: codecov/codecov-action@v5
80+
with:
81+
token: ${{secrets.CODECOV_TOKEN}}
82+
slug: goplus/llcppg

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.20
55
require (
66
github.com/google/go-cmp v0.6.0
77
github.com/goplus/gogen v1.16.3
8-
github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589
8+
github.com/goplus/llgo v0.9.9-0.20241130054737-7b6b8b0eeb84
99
github.com/goplus/mod v0.13.12
1010
)
1111

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ github.com/goplus/gogen v1.16.3 h1:nNkV1b6zd89d/UhMb4bZHcEfdAHtPaadrJFXNcoUITI=
44
github.com/goplus/gogen v1.16.3/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
55
github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589 h1:u0aqHCN6z+Md1FYB052ROjP/6PVlFBtWWuTi/LGuifs=
66
github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
7+
github.com/goplus/llgo v0.9.9-0.20241130054737-7b6b8b0eeb84 h1:HLJLWm7UdRD3yaAXwQ/7WG8aZetFSQws+ozmeCoQHgk=
8+
github.com/goplus/llgo v0.9.9-0.20241130054737-7b6b8b0eeb84/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
9+
github.com/goplus/llgo v0.9.9-0.20241202055125-7a5bd6ae6a7f h1:Dr1wCSfVYL6n0fzQDXx/BeLF2A4D0/SB1jJ2vkLY6TQ=
10+
github.com/goplus/llgo v0.9.9-0.20241202055125-7a5bd6ae6a7f/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
711
github.com/goplus/mod v0.13.12 h1:Trwk6j3i9VvBuW6/9ZxmkoFlEL2v3HKQu0Na1c6DAdw=
812
github.com/goplus/mod v0.13.12/go.mod h1:fyCcoiL02uUQK9CWxGK9pQzuJT+rZIvRKaaG+hSa2bk=
913
github.com/qiniu/x v1.13.10 h1:J4Z3XugYzAq85SlyAfqlKVrbf05glMbAOh+QncsDQpE=

0 commit comments

Comments
 (0)