-
Notifications
You must be signed in to change notification settings - Fork 11
59 lines (54 loc) · 1.79 KB
/
rust.yml
File metadata and controls
59 lines (54 loc) · 1.79 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Rust
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Download bitcoind 28.0
run: curl -sSL https://bitcoincore.org/bin/bitcoin-core-28.0/bitcoin-28.0-x86_64-linux-gnu.tar.gz | tar -xz
- name: Download elementsd 23.2.4
run: curl -sSL https://github.com/ElementsProject/elements/releases/download/elements-23.2.4/elements-23.2.4-x86_64-linux-gnu.tar.gz | tar -xz
- name: Run tests
run: cargo test
- name: Run ignored tests
run: cargo test -- --ignored
env:
BITCOIND_EXEC: ${{ github.workspace }}/bitcoin-28.0/bin/bitcoind
ELEMENTSD_EXEC: ${{ github.workspace }}/elements-23.2.4/bin/elementsd
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check
- name: Check benches
run: cargo check --benches
- name: Check tests
run: cargo check --tests
- name: Check no default features
run: cargo check --no-default-features
- name: Check no default features with test_env
run: cargo check --no-default-features --features test_env
nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
extra_nix_config: |
trusted-public-keys = nix.casatta.it:HseKZh7436/vKXfZDBHbhr7wwAkzjLwY5BIq+OOrITg= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://nix.casatta.it https://cache.nixos.org/
- run: nix build .