erasure coding lib #151
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: CI | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Swift Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check swift codestyle | |
uses: norio-nomura/[email protected] | |
with: | |
args: lint --config .swiftlint.yml --strict | |
test: | |
name: Build and Test | |
runs-on: [self-hosted, linux] | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Get blst submodule commit hash | |
id: blst-commit-hash | |
run: | | |
echo "commit-hash=$(git submodule status Utils/Sources/blst/ | cut -c2-41)" >> $GITHUB_OUTPUT | |
- name: Get rocksdb submodule commit hash | |
id: rocksdb-commit-hash | |
run: | | |
echo "commit-hash=$(git submodule status Database/Sources/rocksdb/ | cut -c2-41)" >> $GITHUB_OUTPUT | |
- name: Cache SPM | |
uses: actions/cache@v4 | |
with: | |
path: '**/.build' | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
- name: Cache Cargo | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
Utils/Sources/bandersnatch/target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache blst static lib | |
uses: actions/cache@v4 | |
with: | |
path: .lib/libblst.a | |
key: ${{ runner.os }}-libs-blst-${{ steps.blst-commit-hash.outputs.commit-hash }} | |
restore-keys: | | |
${{ runner.os }}-libs-blst | |
- name: Cache bandersnatch_vrfs static lib | |
uses: actions/cache@v4 | |
with: | |
path: .lib/libbandersnatch_vrfs.a | |
key: ${{ runner.os }}-libs-libbandersnatch-${{ hashFiles('Utils/Sources/bandersnatch/**') }} | |
restore-keys: | | |
${{ runner.os }}-libs-libbandersnatch | |
- name: Cache rocksdb static lib | |
uses: actions/cache@v4 | |
with: | |
path: .lib/librocksdb.a | |
key: ${{ runner.os }}-libs-librocksdb-${{ steps.rocksdb-commit-hash.outputs.commit-hash }} | |
restore-keys: | | |
${{ runner.os }}-libs-librocksdb | |
- name: Cache erasure-coding static lib | |
uses: actions/cache@v4 | |
with: | |
path: .lib/libec.a | |
key: ${{ runner.os }}-libs-libec-${{ hashFiles('Utils/Sources/erasure-coding/**') }} | |
restore-keys: | | |
${{ runner.os }}-libs-libec | |
- name: Setup Swift | |
uses: SwiftyLab/setup-swift@latest | |
with: | |
swift-version: '6.0' | |
development: true | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Check rust format | |
run: cargo +nightly fmt --all --manifest-path Utils/Sources/bandersnatch/Cargo.toml -- --check | |
- name: Build | |
run: make build | |
- name: Test | |
run: make test |