Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
syntrust committed Dec 6, 2023
1 parent 48e0574 commit 7d9e345
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,20 @@ jobs:

- name: Create package
run: |
mkdir ${{ env.BUILD_DIR }}
mkdir -p ${{ env.BUILD_DIR }}/build/bin/snarkbuild
cp -r ethstorage/prover/snarkjs build/bin
cp run.sh ${{ env.BUILD_DIR }}
- name: Build
run: |
make TARGETOS=linux TARGETARCH=amd64
mv build/bin ${{ env.BUILD_DIR }}
make build TARGETOS=linux TARGETARCH=amd64
mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/
tar -czvf es-node.${{ github.ref_name }}.linux-amd64.tar.gz ${{ env.BUILD_DIR }}
make TARGETOS=darwin TARGETARCH=amd64
mv build/bin ${{ env.BUILD_DIR }}
make build TARGETOS=darwin TARGETARCH=amd64
mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/
tar -czvf es-node.${{ github.ref_name }}.darwin-amd64.tar.gz ${{ env.BUILD_DIR }}
make TARGETOS=darwin TARGETARCH=arm64
mv build/bin ${{ env.BUILD_DIR }}
make build TARGETOS=darwin TARGETARCH=arm64
mv build/bin/es-node ${{ env.BUILD_DIR }}/build/bin/
tar -czvf es-node.${{ github.ref_name }}.darwin-arm64.tar.gz ${{ env.BUILD_DIR }}
- name: Create Release
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ LDFLAGSSTRING +=-X main.Meta=$(VERSION_META)
LDFLAGSSTRING +=-X 'main.BuildTime=$(BUILDDATE)'
LDFLAGS := -ldflags "$(LDFLAGSSTRING)"

es-node:
env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o build/bin/es-node ./cmd/es-node/
es-node: build
cp -r ethstorage/prover/snarkjs build/bin
mkdir -p build/bin/snarkbuild

build:
env GO111MODULE=on GOOS=$(TARGETOS) GOARCH=$(TARGETARCH) go build -v $(LDFLAGS) -o build/bin/es-node ./cmd/es-node/

clean:
rm build -r
rm -r build

test:
go test -v ./...
Expand Down

0 comments on commit 7d9e345

Please sign in to comment.