mirror of
https://github.com/btcsuite/btcd.git
synced 2025-03-10 17:26:07 +01:00
In this commit, we adapt the Makefile that was being used for the btcutil project to work for btcd as well. The Makefile is pretty simple, and is just a series of templated commands. Overtime, we can pull in some of the `lnd` additions as well, which we use to handle our reproducible build and verification system.
69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
name: Build and Test
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
# go needs absolute directories, using the $HOME variable doesn't work here.
|
|
GOCACHE: /home/runner/work/go/pkg/build
|
|
GOPATH: /home/runner/work/go
|
|
GO_VERSION: 1.17.5
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Check out source
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
run: make build
|
|
|
|
test-cover:
|
|
name: Unit coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Check out source
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Test
|
|
run: make unit-cover
|
|
|
|
- name: Send top-level coverage
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: coverage.txt
|
|
|
|
- name: Send btcutil coverage
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: btcutil/coverage.txt
|
|
|
|
- name: Send btcutil coverage for psbt package
|
|
uses: shogo82148/actions-goveralls@v1
|
|
with:
|
|
path-to-profile: btcutil/psbt/coverage.txt
|
|
|
|
test-race:
|
|
name: Unit race
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ env.GO_VERSION }}
|
|
|
|
- name: Check out source
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Test
|
|
run: make unit-race
|