Fix shutdown save peers utreexo #893
Workflow file for this run
This file contains 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: Rust | |
on: | |
push: | |
pull_request: | |
branches: ["master"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
linting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install latest nightly | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt, clippy | |
- name: Cache Rust | |
uses: Swatinem/rust-cache@v2 | |
- name: Run cargo fmt | |
run: cargo +nightly fmt --all --check | |
- name: Run cargo clippy | |
run: cargo +nightly clippy --all-targets | |
env: | |
PWD: ${{ github.workspace }} # without it ci can't see env!("PWD") | |
cross-testing: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build Floresta | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
env: | |
PWD: ${{ github.workspace }} # without it ci can't see env!("PWD") | |
build-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-docker-${{ hashFiles('Dockerfile') }} | |
- name: Build Docker image | |
run: | | |
docker buildx build --cache-to=type=local,dest=/tmp/.buildx-cache --cache-from=type=local,src=/tmp/.buildx-cache -t dlsz/floresta:latest . |