Skip to content

Commit

Permalink
remove Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
colinlyguo committed May 13, 2024
1 parent f8b88ce commit 75d5ce7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ fmt:
goimports -w .
gofumpt -l -w .

build:
docker build -t my-dev-container --platform linux/amd64 .

run: build
docker run -it --rm -v "$(PWD):/workspace" -w /workspace my-dev-container

test:
./run_test.sh
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Running unit tests
```
make run
docker pull scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03 --platform linux/amd64
docker run -it --rm -v "$(PWD):/workspace" -w /workspace scrolltech/go-rust-builder:go-1.21-rust-nightly-2023-12-03
cd libzstd
make libzstd
cd ..
Expand Down
9 changes: 5 additions & 4 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

# Compile libzstd
cd libzstd && cargo build --release && cd ..
sudo cp -f $(pwd)/libzstd/target/release/libscroll_zstd.so $(pwd)/
find $(pwd)/libzstd/target/release | grep libzktrie.so | xargs -I{} cp -f {} $(pwd)/
sudo mkdir -p /scroll/lib/
sudo cp -f $(pwd)/libzstd/target/release/libscroll_zstd.so /scroll/lib/
find $(pwd)/libzstd/target/release -name 'libzktrie.so' | xargs -I{} sudo cp -f {} /scroll/lib/

# Set the environment variable
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
export CGO_LDFLAGS="-L$(pwd) -Wl,-rpath=$(pwd)"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/scroll/lib
export CGO_LDFLAGS="-L/scroll/lib/ -Wl,-rpath=/scroll/lib/"

# Run module tests
go test -v -race -gcflags="-l" -ldflags="-s=false" -coverprofile=coverage.txt -covermode=atomic ./...

0 comments on commit 75d5ce7

Please sign in to comment.