Skip to content

Commit

Permalink
Problem: missing Makefile equivalent for windows (fix crypto-org-chai…
Browse files Browse the repository at this point in the history
…n#443) (crypto-org-chain#469)

Solution: add compiling script for windows
needs mingw64 beforehand for native compile
  • Loading branch information
leejw51crypto committed Apr 20, 2021
1 parent f8f0ba5 commit 7a49be9
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/buildwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build

on:
pull_request:
push:
branches:
- master
- release/**
jobs:
build:
name: Build For Windowss
runs-on: windows-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.1
- name: Normal check out code
uses: actions/checkout@v2
with:
submodules: true
- name: Set GOBIN
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Build For Windows
shell: pwsh
run: |
echo "Working Folder $Env:GITHUB_WORKSPACE"
& "$env:GITHUB_WORKSPACE/makewin.bat"
14 changes: 14 additions & 0 deletions makewin.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rem get version
git describe --tag > temp.txt
set /p VERSION=<temp.txt

rem get commit hash
git log -1 --format=%%H > temp.txt
set /p COMMIT=<temp.txt

rem clear
del temp.txt


set LDFLAG="-X github.com/cosmos/cosmos-sdk/version.Name=crypto-org-chain-chain -X github.com/cosmos/cosmos-sdk/version.ServerName=chain-maind -X github.com/cosmos/cosmos-sdk/version.Version=%VERSION% -X github.com/cosmos/cosmos-sdk/version.Commit=%COMMIT%"
go install -mod=readonly -ldflags %LDFLAG% -tags cgo,ledger,!test_ledger_mock,!ledger_mock,!ledger_zemu ./cmd/chain-maind

0 comments on commit 7a49be9

Please sign in to comment.