diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..2b82537 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,71 @@ +name: Rust CI +on: [push] + +env: + CARGO_TERM_COLOR: always + +jobs: + cargo-tests: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain + uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo test + run: cargo test --all --all-features --locked + cargo-lint: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain + uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: cargo fmt + run: cargo +nightly fmt --all -- --check + - name: cargo clippy + run: cargo +nightly clippy --workspace --all --all-features --locked -- -D warnings + cargo-build: + runs-on: ubuntu-latest + timeout-minutes: 20 + continue-on-error: true + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain + uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: build + id: build + run: cargo build --workspace --all --locked + cargo-doc: + runs-on: ubuntu-latest + timeout-minutes: 20 + continue-on-error: true + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Install Rust nightly toolchain + uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + with: + cache-on-failure: true + - name: doclint + id: build + continue-on-error: true + run: RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps --all-features --document-private-items + - name: doctest + run: cargo test --doc --all --all-features --locked + diff --git a/.gitignore b/.gitignore index 4fffb2f..ea8c4bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ /target -/Cargo.lock diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..996be2e --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,23 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "evm_glue" +version = "0.1.0" +dependencies = [ + "hex", + "hex-literal", +] + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46"