Skip to content

Commit aa4a395

Browse files
Merge pull request #815 from pastelnetwork/revert-811-veermeer-test
Revert "Manage libwebp internally through static linking"
2 parents 74c0529 + 6248b3f commit aa4a395

File tree

31 files changed

+77
-85
lines changed

31 files changed

+77
-85
lines changed

.circleci/config.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ commands:
2121
name: Install Go
2222
command: |
2323
cd ..
24-
wget https://golang.org/dl/go1.22.1.linux-amd64.tar.gz
24+
wget https://golang.org/dl/go1.22.0.linux-amd64.tar.gz
2525
sudo rm -r /usr/local/go
26-
sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
26+
sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
2727
echo 'export PATH=$PATH:/usr/local/go/bin:~/go/bin' >> ~/.bashrc
2828
echo 'export CGO_ENABLED=1' >> ~/.bashrc
2929
echo "export GOPATH=\"$HOME/go\"" >> ~/.bashrc
@@ -55,6 +55,17 @@ commands:
5555
working_directory: ~/<< parameters.path >>/<< parameters.package >>
5656
command: |
5757
ls
58+
# diff -u <(echo -n) <(gofmt -d -e .)
59+
# - run:
60+
# name: "<< parameters.package >>: Run go vet"
61+
# working_directory: ~/<< parameters.path >>/<< parameters.package >>
62+
# command: |
63+
# go vet -v ./...
64+
#- run:
65+
# name: "<< parameters.package >>: Run revive"
66+
# working_directory: ~/<< parameters.path >>/<< parameters.package >>
67+
# command: |
68+
# revive -config ~/<< parameters.path >>/.circleci/revive.toml ./...
5869
- run:
5970
name: "<< parameters.package >>: Run staticcheck"
6071
working_directory: ~/<< parameters.path >>/<< parameters.package >>
@@ -120,14 +131,16 @@ commands:
120131
APP_VERSION="latest"
121132
fi
122133
123-
export APP_LDFLAGS="-linkmode external -extldflags "-static" -s -w -X github.com/pastelnetwork/gonode/common/version.version=$APP_VERSION"
134+
export APP_LDFLAGS="-X github.com/pastelnetwork/gonode/common/version.version=$APP_VERSION"
124135
echo "APP_VERSION=$APP_VERSION"
125136
echo "APP_LDFLAGS=$APP_LDFLAGS"
126137
127138
if [[ "<< parameters.targets >>" == *"linux/amd64"* ]]; then
128139
echo "Building << parameters.package >> for Linux"
140+
sudo apt-get update
141+
sudo apt-get install -y libwebp-dev
129142
cd << parameters.package >>
130-
CGO_ENABLED=1 GOOS=linux CC=musl-gcc GOARCH=amd64 go build -o $LINUX_ARTIFACT -ldflags "$APP_LDFLAGS"
143+
GOOS=linux GOARCH=amd64 go build -o $LINUX_ARTIFACT -ldflags "$APP_LDFLAGS"
131144
echo "Done Building << parameters.package >> for Linux"
132145
cd ..
133146
fi
@@ -273,16 +286,6 @@ commands:
273286
make check
274287
sudo make install
275288
sudo /sbin/ldconfig -v
276-
instal_musl:
277-
steps:
278-
- run:
279-
name: Install Musl
280-
command: |
281-
sudo apt-get update
282-
sudo apt-get install musl musl-dev musl-tools
283-
sudo apt-get update
284-
sudo apt-get install -y libwebp-dev
285-
286289
287290
jobs:
288291
prepare_workspace:
@@ -292,7 +295,7 @@ jobs:
292295
- run:
293296
name: Detect not merged code
294297
command: |
295-
ls
298+
./scripts/merge_master.sh
296299
- install_go
297300
- setup
298301
- run:
@@ -451,8 +454,6 @@ jobs:
451454
- checkout
452455
- install_go
453456
- setup
454-
- instal_musl
455-
- install_libsodium
456457
- run:
457458
name: Update PATH and GOPATH
458459
command: |
@@ -488,8 +489,6 @@ jobs:
488489
at: ~/go
489490
- install_go
490491
- install_tensorflow
491-
- instal_musl
492-
- install_libsodium
493492
- run:
494493
name: Update PATH and GOPATH
495494
command: |
@@ -570,4 +569,4 @@ workflows:
570569
only: /^v.*/
571570
context:
572571
- Release
573-
- weekly-beta-builds
572+
- weekly-beta-builds

common/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/pastelnetwork/gonode/common
22

3-
go 1.22.1
3+
go 1.22.0
44

55
replace (
6-
github.com/pastelnetwork/gonode/go-webp => ../go-webp
6+
github.com/kolesa-team/go-webp => ../go-webp
77
github.com/pastelnetwork/gonode/pastel => ../pastel
88
github.com/pastelnetwork/gonode/raptorq => ../raptorq
99
golang.org/x/crypto => github.com/golang/crypto v0.13.0
@@ -18,10 +18,10 @@ require (
1818
github.com/jpillora/longestcommon v0.0.0-20161227235612-adb9d91ee629
1919
github.com/json-iterator/go v1.1.12
2020
github.com/klauspost/compress v1.16.7
21+
github.com/kolesa-team/go-webp v1.0.4
2122
github.com/makiuchi-d/gozxing v0.1.1
2223
github.com/mattn/go-sqlite3 v1.14.17
2324
github.com/otrv4/ed448 v0.0.0-20221017120334-a33859724cfd
24-
github.com/pastelnetwork/gonode/go-webp v0.0.0-20240307160103-cb14e62b9021
2525
github.com/pastelnetwork/gonode/pastel v0.0.0-00010101000000-000000000000
2626
github.com/patrickmn/go-cache v2.1.0+incompatible
2727
github.com/pkg/errors v0.9.1

common/storage/files/file.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515

1616
"github.com/pastelnetwork/gonode/common/log"
1717

18-
"github.com/pastelnetwork/gonode/go-webp/decoder"
19-
"github.com/pastelnetwork/gonode/go-webp/encoder"
20-
"github.com/pastelnetwork/gonode/go-webp/webp"
18+
"github.com/kolesa-team/go-webp/decoder"
19+
"github.com/kolesa-team/go-webp/encoder"
20+
"github.com/kolesa-team/go-webp/webp"
2121

2222
"github.com/disintegration/imaging"
2323
"github.com/pastelnetwork/gonode/common/errors"

dupedetection/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/pastelnetwork/gonode/dupedetection
22

3-
go 1.22.1
3+
go 1.22.0
44

55
replace (
66
github.com/pastelnetwork/gonode/common => ../common

go-webp/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# go-webp
22
[![Build Status](https://travis-ci.com/kolesa-team/go-webp.svg)](https://travis-ci.com/github/kolesa-team/go-webp)
3-
[![GoDoc](https://godoc.org/github.com/pastelnetwork/gonode/go-webp?status.svg)](https://godoc.org/github.com/pastelnetwork/gonode/go-webp)
4-
[![Go Report](https://goreportcard.com/badge/github.com/pastelnetwork/gonode/go-webp)](https://goreportcard.com/report/github.com/pastelnetwork/gonode/go-webp)
3+
[![GoDoc](https://godoc.org/github.com/kolesa-team/go-webp?status.svg)](https://godoc.org/github.com/kolesa-team/go-webp)
4+
[![Go Report](https://goreportcard.com/badge/github.com/kolesa-team/go-webp)](https://goreportcard.com/report/github.com/kolesa-team/go-webp)
55

66
Golang Webp library for encoding and decoding, using **C** binding for Google libwebp
77

@@ -13,13 +13,13 @@ Golang Webp library for encoding and decoding, using **C** binding for Google li
1313
% go test -bench "^BenchmarkDecode" ./webp
1414
goos: darwin
1515
goarch: amd64
16-
pkg: github.com/pastelnetwork/gonode/go-webp/webp
16+
pkg: github.com/kolesa-team/go-webp/webp
1717
BenchmarkDecodeLossy-12 45 25965139 ns/op
1818
BenchmarkDecodeXImageLossy-12 13 90735879 ns/op
1919
BenchmarkDecodeLossless-12 64 18887482 ns/op
2020
BenchmarkDecodeXImageLossless-12 27 42422596 ns/op
2121
PASS
22-
ok github.com/pastelnetwork/gonode/go-webp/webp 7.877s
22+
ok github.com/kolesa-team/go-webp/webp 7.877s
2323
```
2424

2525
## Install libwebp
@@ -34,7 +34,7 @@ sudo apt-get install libwebp-dev
3434
```
3535

3636
## Install
37-
`go get -u github.com/pastelnetwork/gonode/go-webp`
37+
`go get -u github.com/kolesa-team/go-webp`
3838

3939
## Examples
4040

@@ -47,8 +47,8 @@ import (
4747
"log"
4848
"os"
4949

50-
"github.com/pastelnetwork/gonode/go-webp/decoder"
51-
"github.com/pastelnetwork/gonode/go-webp/webp"
50+
"github.com/kolesa-team/go-webp/decoder"
51+
"github.com/kolesa-team/go-webp/webp"
5252
)
5353

5454
func main() {
@@ -83,8 +83,8 @@ go run example/decode/main.go
8383
package main
8484

8585
import (
86-
"github.com/pastelnetwork/gonode/go-webp/encoder"
87-
"github.com/pastelnetwork/gonode/go-webp/webp"
86+
"github.com/kolesa-team/go-webp/encoder"
87+
"github.com/kolesa-team/go-webp/webp"
8888
"image/jpeg"
8989
"log"
9090
"os"

go-webp/decoder/decoder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"io/ioutil"
3737
"unsafe"
3838

39-
"github.com/pastelnetwork/gonode/go-webp/utils"
39+
"github.com/kolesa-team/go-webp/utils"
4040
)
4141

4242
// Decoder stores information to decode picture

go-webp/decoder/decoder_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"os"
2626
"testing"
2727

28-
"github.com/pastelnetwork/gonode/go-webp/utils"
28+
"github.com/kolesa-team/go-webp/utils"
2929
)
3030

3131
func TestNewDecoder(t *testing.T) {

go-webp/example/decode/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626
"log"
2727
"os"
2828

29-
"github.com/pastelnetwork/gonode/go-webp/decoder"
30-
"github.com/pastelnetwork/gonode/go-webp/webp"
29+
"github.com/kolesa-team/go-webp/decoder"
30+
"github.com/kolesa-team/go-webp/webp"
3131
)
3232

3333
func main() {

go-webp/example/encode/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
package main
2323

2424
import (
25+
"github.com/kolesa-team/go-webp/encoder"
26+
"github.com/kolesa-team/go-webp/webp"
2527
"image/jpeg"
2628
"log"
2729
"os"
28-
29-
"github.com/pastelnetwork/gonode/go-webp/encoder"
30-
"github.com/pastelnetwork/gonode/go-webp/webp"
3130
)
3231

3332
func main() {

go-webp/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/pastelnetwork/gonode/go-webp
1+
module github.com/kolesa-team/go-webp
22

33
go 1.17
44

0 commit comments

Comments
 (0)