Add BTC checksum #1043
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Suite | |
on: | |
pull_request: | |
merge_group: | |
types: [checks_requested] | |
push: | |
branches: | |
- main | |
concurrency: | |
# For pull requests, cancel running workflows, for main, run all | |
# | |
# `github.event.number` exists for pull requests, otherwise fall back to SHA | |
# for main | |
group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
cancel-in-progress: true | |
env: | |
RUST_BACKTRACE: full | |
VERBOSE: true | |
CI: true | |
PROFILE: debug | |
# Error on warnings (https://doc.rust-lang.org/rustc/lints/groups.html) | |
RUSTFLAGS: "-D warnings" | |
jobs: | |
sds: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: sds | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- name: "Format check" | |
run: cargo fmt --check --all | |
- name: "Tests" | |
run: cargo test --workspace | |
- name: "clippy" | |
run: cargo clippy --workspace -- -D warnings | |
sds-go: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: sds-go | |
steps: | |
- uses: actions/checkout@v4 | |
- run: source "$HOME/.cargo/env" | |
- name: "Build the SDS Go/Rust wrapper" | |
run: | | |
cd rust | |
cargo build --release | |
- name: "Run the Go linter" | |
run: | | |
cd go | |
go install honnef.co/go/tools/cmd/[email protected] | |
export PATH=$PATH:$(go env GOPATH)/bin | |
LD_LIBRARY_PATH=../rust/target/release staticcheck ./... | |
gofmt -s -w . && git diff --exit-code | |
# Replace the gofmt command above by `gofmt -s -d .` when the following is resolved https://github.com/golang/go/issues/46289 | |
go mod tidy -diff | |
- name: "Run the Go unit tests" | |
run: | | |
cd go | |
LD_LIBRARY_PATH=../rust/target/release go test -v ./... | |
- name: "Make sure the example builds and stays relevant" | |
run: | | |
cd go/example | |
go build -buildvcs=false | |
license-3rdparty: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Install dd-rust-license-tool" | |
run: cargo install dd-rust-license-tool | |
- name: "Check LICENSE-3rdparty.csv" | |
run: ./scripts/generate_license_3rdparty.sh check |