Skip to content

Commit

Permalink
ci: add initial Continuous Integration Workflows using GitHub® Action…
Browse files Browse the repository at this point in the history
…s™ (#8)

* ci

* clone submodules

* more submodules

* ci: add feature flags
  • Loading branch information
DaniPopes authored Apr 19, 2023
1 parent 299a7fc commit c6f6639
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 5 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
push:
branches: [main]
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: test ${{ matrix.os }} ${{ matrix.flags }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
flags: ["--no-default-features", "", "--all-features"]
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: test
run: cargo +stable test --workspace ${{ matrix.flags }}

clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: clippy
run: cargo clippy --workspace --tests
env:
RUSTFLAGS: -Dwarnings

docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- name: doc
run: cargo doc --workspace --no-deps --document-private-items

fmt:
name: fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: fmt --check
run: cargo fmt --all --check
23 changes: 23 additions & 0 deletions .github/workflows/deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: deps

on:
push:
branches: [main]
paths: [Cargo.lock]
pull_request:
branches: [main]
paths: [Cargo.lock]

concurrency: deps-${{ github.head_ref || github.run_id }}

jobs:
deny:
name: deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check all
6 changes: 1 addition & 5 deletions primitives/src/signed/int.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ use ruint::Uint;
#[cfg(not(feature = "std"))]
use alloc::{format, string::String};

use super::{
errors::{self},
utils::*,
Sign,
};
use super::{errors, utils::*, Sign};

#[derive(Clone, Copy, Default, PartialEq, Eq, Hash)]
/// Signed integer wrapping a `ruint::Uint`.
Expand Down

0 comments on commit c6f6639

Please sign in to comment.