Skip to content

Commit

Permalink
chore: upgrade protoc for osx aarch_64 (cloudwego#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaost authored Sep 25, 2024
1 parent 1b9959b commit 382d8d7
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ go.work
go.work.sum

# Files produced by run.sh
*.bak
*.zip
kitex_gen/
kitex_gen_slim/
kitex_gen_noDefSerdes/
grpc_gen/
go.mod
go.sum
*.bak
bin
thrift_streaming/binaries
thrift_streaming/kitex_gen/
Expand Down
28 changes: 16 additions & 12 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,17 @@ fi

set -x

PROTOC_OUT=$PWD/bin
PROTOC_VERSION=v3.13.0 # FIXME: this version doesn't support darwin arm64
PATH_BIN=$PWD/bin
mkdir -p $PATH_BIN

export PATH=$PATH_BIN:$PATH

# GOBIN need to be changed here as kitex-tests will install different version bin when testing,
# GOPATH remains the same as default,
# coz other runners in the same host may share path like GOMODCACHE, GOCACHE
export GOBIN=$PATH_BIN

PROTOC_VERSION=v3.20.2

install_protoc() {
echo "installing protoc ... "
Expand All @@ -39,8 +48,7 @@ install_protoc() {
rm -f $filename
wget -q $url || exit 1
unzip -o -q $filename -d ./tmp/
mkdir -p $PROTOC_OUT
mv ./tmp/bin/protoc $PROTOC_OUT
mv ./tmp/bin/protoc $PATH_BIN
rm -rf ./tmp/
echo "installing protoc ... done"
}
Expand All @@ -55,8 +63,6 @@ kitex_cmd() {
kitex --no-dependency-check $@
}

export PATH=$PROTOC_OUT:$PATH

echo -e "\ninstalling missing commands\n"

# install protoc
Expand Down Expand Up @@ -87,12 +93,10 @@ echo -e "\ninstalling missing commands ... done\n"

# double check commands,
# set -e may not working since commands run in background
which protoc
which protoc-gen-go
which protoc-gen-go-grpc
which thriftgo
which kitex

protoc --version
protoc-gen-go --version
protoc-gen-go-grpc --version
thriftgo --version
kitex -version

rm -f go.mod # go mod init fails if it already exists
Expand Down
6 changes: 3 additions & 3 deletions thrift_streaming/exitserver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
golang.org/x/arch v0.2.0 // indirect
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
9 changes: 6 additions & 3 deletions thrift_streaming/exitserver/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,9 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b h1:tvrvnPFcdzp294diPnrdZZZ8XUt2Tyj7svb7X52iDuU=
golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down Expand Up @@ -318,17 +319,19 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2 h1:fqTvyMIIj+HRzMmnzr9NtpHP6uVpvB5fkHcgPDC4nu8=
golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
1 change: 1 addition & 0 deletions thrift_streaming/exitserver/update_go_mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ go mod init github.com/cloudwego/kitex-tests/thrift_streaming/exitserver
# using legacy kitex version on purpose
go get github.com/cloudwego/[email protected]
go get github.com/apache/[email protected]
go get golang.org/x/[email protected] # fix security issues
go mod edit -replace github.com/apache/thrift=github.com/apache/[email protected]

# updating tricky packages to make sure it works ...
Expand Down

0 comments on commit 382d8d7

Please sign in to comment.