chore: remove rsa-export dependency to version 0.3.3 #133
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: Lint Check && nextest && build | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
workflow_dispatch: | |
env: | |
CARGO_SCCACHE_COMMIT: bed5571c | |
jobs: | |
# cargo_nextest: | |
# name: "Cargo Nextest (${{matrix.name}})" | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# include: | |
# - name: Linux | |
# id: linux | |
# os: ubuntu-latest | |
# type: stable | |
# runs_integ_tests: true | |
# upload_profraws: true | |
# - name: Linux Nightly | |
# id: linux-nightly | |
# os: ubuntu-latest | |
# type: nightly | |
# runs_integ_tests: true | |
# upload_profraws: true | |
# timeout-minutes: 90 | |
# steps: | |
# - uses: actions/checkout@v4 | |
# # Install all the required tools | |
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
# with: | |
# tool: just,cargo-nextest,cargo-llvm-cov | |
# # Run the tests: | |
# - run: mkdir -p coverage/profraw/{unit,integration,binaries} | |
# # - Run the unit tests, retrieving the coverage information | |
# - run: just codecov-ci "nextest-unit ${{ matrix.type }}" | |
# - run: mv coverage/codecov/{new,unit-${{matrix.id}}}.json | |
# - run: mv coverage/profraw/{new,unit/${{matrix.id}}}.tar.zst | |
# # - Run the integration tests, retrieving the coverage information | |
# - run: just codecov-ci "nextest-integration ${{ matrix.type }}" | |
# if: matrix.runs_integ_tests | |
# - run: mv coverage/codecov/{new,integration-${{matrix.id}}}.json | |
# if: matrix.runs_integ_tests | |
# - run: mv coverage/profraw/{new,integration/${{matrix.id}}}.tar.zst | |
# if: matrix.runs_integ_tests | |
# # Cleanup the target directory, leaving only stuff interesting to llvm-cov, and tarball it | |
# - run: just tar-bins-for-coverage-ci | |
# - run: mv coverage/profraw/binaries/{new,${{matrix.id}}}.tar.zst | |
# # Upload the coverage | |
# - uses: actions/upload-artifact@v3 | |
# if: matrix.upload_profraws | |
# with: | |
# name: coverage-profraw | |
# path: coverage/profraw | |
# retention-days: 2 | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: coverage-codecov | |
# path: coverage/codecov | |
rpc_error_schema: | |
name: "RPC Schema" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
with: | |
tool: just | |
- run: just check-rpc-errors-schema | |
# lychee_checks: | |
# name: "Lychee Lints" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: lycheeverse/lychee-action@2ac9f030ccdea0033e2510a23a67da2a2da98492 | |
# with: | |
# fail: true | |
check_fmt: | |
name: "Cargo Fmt" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
with: | |
tool: just | |
- run: just check-cargo-fmt | |
# check_clippy: | |
# name: "Cargo Clippy" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
# with: | |
# tool: just | |
# - run: just check-cargo-clippy | |
doctests: | |
name: "Rust Doctests" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
with: | |
tool: just | |
- run: just doctests | |
# check_cargo_deny: | |
# name: "Cargo Deny" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
# with: | |
# tool: just,cargo-deny | |
# - run: just check-cargo-deny | |
check-crates-publish-checker: | |
name: "Crates Publish Checker" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
with: | |
tool: just | |
- run: just check-crates-publish-checker | |
check_non_default: | |
name: "Non-default Configuration Builds" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
with: | |
tool: just | |
- run: just check-non-default | |
# check_udeps: | |
# name: "Unused Dependencies" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
# with: | |
# tool: just,cargo-udeps | |
# - run: just check-cargo-udeps | |
# cargo_audit: | |
# name: "Cargo Audit" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: taiki-e/install-action@9b5b983efc779f85e5e5d11539f005e85ccb27ff | |
# with: | |
# tool: cargo-audit | |
# - run: cargo audit -D warnings | |
build: | |
runs-on: ubuntu-latest | |
needs: [rpc_error_schema, check_fmt, doctests, check_non_default] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/ | |
~/.cargo/bin/sccache* | |
key: ${{ runner.OS }}-sccache-bin-${{ env.CARGO_SCCACHE_COMMIT }}-v1 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential pkg-config libssl-dev valgrind git clang curl libssl-dev protobuf-compiler unzip python3-pip | |
- name: Setup Rust toolchain | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
source "$HOME/.cargo/env" | |
rustup show | |
- name: Set PATH for cargo | |
run: | | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
echo "SCCACHE_DIR=${HOME}/.cache/sccache" >> $GITHUB_ENV | |
- name: SCCache | |
run: | | |
# We altered the path to avoid old actions to overwrite it | |
if [ ! -f ~/.cargo/bin/sccache ]; then | |
cargo install sccache \ | |
--git https://github.com/purestake/sccache.git \ | |
--rev $CARGO_SCCACHE_COMMIT \ | |
--force --no-default-features --features=dist-client | |
fi | |
if [[ -z `pgrep sccache` ]]; then | |
chmod +x ~/.cargo/bin/sccache | |
sccache --start-server | |
fi | |
sccache -s | |
echo "RUSTC_WRAPPER=${HOME}/.cargo/bin/sccache" >> $GITHUB_ENV | |
- name: Build node | |
run: cargo build --release -p unc-node | |
- name: Upload unc-node binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: unc-node | |
path: target/release/unc-node | |
- name: Display SCCache Stats | |
run: sccache --show-stats |