Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci:llgo follow main #152

Merged
merged 2 commits into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 28 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.23'

- name: Install dependencies
if: startsWith(matrix.os, 'macos')
Expand All @@ -44,18 +44,30 @@ jobs:
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
sudo apt-get install -y llvm-${{matrix.llvm}}-dev clang-${{matrix.llvm}} libunwind-dev 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@latest
git clone https://github.com/goplus/llgo.git
echo $PWD
cd llgo/compiler
go install -v ./cmd/...
export LLGO_ROOT=$GITHUB_WORKSPACE/llgo
echo "LLGO_ROOT=$LLGO_ROOT" >> $GITHUB_ENV

- name: Build
run: go build -v ./...

- name: Set up Go for testing
uses: actions/setup-go@v5
with:
go-version: '1.21'

- name: Install llcppg modules
run: bash ./install.sh
run: |
echo "Using LLGO_ROOT: $LLGO_ROOT"
bash ./install.sh

- name: Test llcppsymg & llcppsigfetch
run: |
Expand All @@ -64,7 +76,18 @@ jobs:
# llgo cmptest ./_xtool/llcppsymg/_cmptest/... causes
# panic: runtime error: index out of range [0] with length 0
cd _xtool/llcppsymg/_cmptest
llgo cmptest ./...

# llgo cmptest ./... cause lld: error: undefined symbol: sort.init
# https://github.com/goplus/llgo/issues/944

llgo cmptest ./args_test
llgo cmptest ./clangutils_test
llgo cmptest ./config_test
llgo cmptest ./names_test
llgo cmptest ./parse_test
llgo cmptest ./symbol_test
llgo cmptest ./symg_test

cd ../../../

- name: Test
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ func ModInit(name string) (string, error) {
if err != nil {
return "", err
}
err = config.RunCommand(outputDir, "go", "get", "github.com/goplus/llgo@latest")
err = config.RunCommand(outputDir, "go", "get", "github.com/goplus/llgo@main")
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/gogensig.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func runGoCmds(wd, pkg string) error {
return err
}

return config.RunCommand(dir, "go", "get", "github.com/goplus/llgo@latest")
return config.RunCommand(dir, "go", "get", "github.com/goplus/llgo@main")
}

func printUsage() {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.20

require (
github.com/google/go-cmp v0.6.0
github.com/goplus/gogen v1.16.3
github.com/goplus/llgo v0.9.9-0.20241220231339-070d64f365ef
github.com/goplus/gogen v1.16.4
github.com/goplus/llgo v0.9.10-0.20250110015923-745eff07836d
github.com/goplus/mod v0.13.12
)

Expand Down
12 changes: 5 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/goplus/gogen v1.16.3 h1:nNkV1b6zd89d/UhMb4bZHcEfdAHtPaadrJFXNcoUITI=
github.com/goplus/gogen v1.16.3/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
github.com/goplus/llgo v0.9.9-0.20241217064315-b4af70ada9f0 h1:+W0c6OtIrheLj+Y5vd3oYL4NzKUzuijHJ4MZ2jhgQiQ=
github.com/goplus/llgo v0.9.9-0.20241217064315-b4af70ada9f0/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
github.com/goplus/llgo v0.9.9-0.20241220231339-070d64f365ef h1:uav5CZ5IGj9+xYXV4UsxyPuFgndlthvTyltitTKliew=
github.com/goplus/llgo v0.9.9-0.20241220231339-070d64f365ef/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
github.com/goplus/gogen v1.16.4 h1:RyU4KhJ8qmdJQwuHKpCYPh3hTFN4wSaPRwXa9syY4R8=
github.com/goplus/gogen v1.16.4/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
github.com/goplus/llgo v0.9.10-0.20250110015923-745eff07836d h1:4dIS7c7Q/o9X+RFIvlxm/2WRmKPoHOpuxKdbACNgiv0=
github.com/goplus/llgo v0.9.10-0.20250110015923-745eff07836d/go.mod h1:DzFcPtfJ+ZHY8H30FpLAutsEOe3U0qMoGiYYisI4oeI=
github.com/goplus/mod v0.13.12 h1:Trwk6j3i9VvBuW6/9ZxmkoFlEL2v3HKQu0Na1c6DAdw=
github.com/goplus/mod v0.13.12/go.mod h1:fyCcoiL02uUQK9CWxGK9pQzuJT+rZIvRKaaG+hSa2bk=
github.com/qiniu/x v1.13.10 h1:J4Z3XugYzAq85SlyAfqlKVrbf05glMbAOh+QncsDQpE=
github.com/qiniu/x v1.13.10/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E=
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
Loading