Skip to content

test all saved cache #64

test all saved cache

test all saved cache #64

Workflow file for this run

name: Build And Test
on: [push]
env:
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: true
CARGOFLAGS: --workspace --all-targets --all-features
RUST_LOG: trace
RISC0_DEV_MODE: 1
TEST_CONFIG: /home/runner/overwrite.toml
jobs:
# Build ------------------------------------------------------------------------
debug_mode_build:
name: Compile code in debug mode
runs-on: ubicloud-standard-16
steps:
- uses: actions/checkout@v4
- name: Save build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "debug-build"
save-if: true
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Compile in debug mode
run: cargo build $CARGOFLAGS
release_mode_build:
name: Compile code in release mode
runs-on: ubicloud-standard-16
steps:
- uses: actions/checkout@v4
- name: Save build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "release-build"
save-if: true
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Compile in release mode
run: cargo build $CARGOFLAGS --release
# Test -------------------------------------------------------------------------
debug_mode_test_with_regtest:
name: Test code in debug mode with Bitcoin Regtest
runs-on: ubicloud-standard-16
needs: debug_mode_build
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: clementine
POSTGRES_USER: clementine
POSTGRES_PASSWORD: clementine
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/service-action
- name: Restore cached build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "debug-build"
save-if: true
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Debug mode cache warm up with max paralel jobs
run: cargo build $CARGOFLAGS
- name: Run tests on Bitcoin regtest
run: cargo test --verbose --jobs 1
debug_mode_test_with_mock_rpc:
name: Test code in debug mode with Bitcoin Mock RPC
runs-on: ubicloud-standard-16
needs: debug_mode_build
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: clementine
POSTGRES_USER: clementine
POSTGRES_PASSWORD: clementine
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/service-action
- name: Restore cached build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "debug-build"
save-if: true
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Run tests on mock RPC
run: cargo test --verbose --features mock_rpc
release_mode_test_with_regtest:
name: Test code in release mode with Bitcoin Regtest
runs-on: ubicloud-standard-16
needs: release_mode_build
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: clementine
POSTGRES_USER: clementine
POSTGRES_PASSWORD: clementine
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/service-action
- name: Restore cached build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "release-build"
save-if: true
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Release mode cache warm up with max paralel jobs
run: cargo build $CARGOFLAGS --release
- name: Run tests on Bitcoin regtest with release build
run: cargo test --verbose --jobs 1 --release
release_mode_test_with_mock_rpc:
name: Test code in release mode with Bitcoin Mock RPC
runs-on: ubicloud-standard-16
needs: release_mode_build
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: clementine
POSTGRES_USER: clementine
POSTGRES_PASSWORD: clementine
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/service-action
- name: Restore cached build artifacts
uses: Swatinem/rust-cache@v2
with:
shared-key: "release-build"
cache-directories: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- name: Run tests on mock RPC with release build
run: cargo test --verbose --features mock_rpc --release