Skip to content

Commit

Permalink
env: add build.yml for build workflow action and do not test arm64 ar…
Browse files Browse the repository at this point in the history
…chitecture
  • Loading branch information
queencre committed Dec 9, 2022
1 parent fc2b84d commit d38f2ea
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 22 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Crescent Core
# This workflow is run on pushes to main & every Pull Requests where a .go, .mod, .sum have been changed
on:
pull_request:
push:
branches:
- main
- release/**
permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}-build
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64"]
# wamsd does not fully support arm64 architecture yet
# Reference https://github.com/CosmWasm/wasmd#supported-systems
# go-arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.18"
- uses: technote-space/get-diff-action@v6.1.2
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
- name: Build
if: env.GIT_DIFF
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build
20 changes: 0 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,6 @@ jobs:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-arch: ["amd64", "arm64"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: technote-space/get-diff-action@v6.0.1
id: git_diff
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Build
run: GOARCH=${{ matrix.go-arch }} LEDGER_ENABLED=false make build

test-coverage:
runs-on: ubuntu-latest
timeout-minutes: 15
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ include contrib/devtools/Makefile
###############################################################################

build: go.sum
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/$(APPNAME).exe ./cmd/$(APPNAME)
ifeq ($(OS),Windows_NT) # wamsd does not support Windows OS yet
exit 1
else
go build $(BUILD_FLAGS) -o build/$(APPNAME) ./cmd/$(APPNAME)
endif
Expand Down

0 comments on commit d38f2ea

Please sign in to comment.