forked from ChihuahuaChain/chihuahua
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.2 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This is a basic workflow that is manually triggered
name: compile chihuahua
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on: [push, pull_request, workflow_dispatch]
# This workflow makes x86_64 binaries for mac, windows, and linux.
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
targetos: [darwin, linux]
include:
- targetos: windows
arch: amd64
name: chihuahua ${{ matrix.arch }} for ${{ matrix.targetos }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "^1.19"
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}
- name: run tests
run: go test ./...
# we build and install in case we want to run it or capture an artifact as we do in the step below.
- name: Compile chihuahuad
run: |
go build ./...
go install ./...
# now uploads genesis.json and bin
- uses: actions/upload-artifact@v3
with:
name: chihuahuad ${{ matrix.targetos }} ${{ matrix.arch }}
path: cmd/chihuahuad