Skip to content

Commit ae1174f

Browse files
Added basic CI workflow (#13)
1 parent 38b4256 commit ae1174f

File tree

7 files changed

+80
-15
lines changed

7 files changed

+80
-15
lines changed

.github/workflows/test.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
types:
11+
- opened
12+
- synchronize
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
env:
19+
CARGO_TERM_COLOR: always
20+
21+
jobs:
22+
ci:
23+
name: CI on ${{ matrix.os }}
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
os:
29+
- ubuntu-24.04
30+
- macos-14
31+
32+
steps:
33+
- name: Checkout repo
34+
uses: actions/checkout@v4
35+
36+
- name: Setup Rust toolchain
37+
uses: actions-rust-lang/setup-rust-toolchain@v1
38+
with:
39+
rustflags: ""
40+
41+
# ────────────── Install geth ──────────────
42+
- name: Install Geth on Ubuntu
43+
if: matrix.os == 'ubuntu-24.04'
44+
run: |
45+
sudo add-apt-repository -y ppa:ethereum/ethereum
46+
sudo apt-get update
47+
sudo apt-get install -y ethereum
48+
49+
- name: Install Geth on macOS
50+
if: matrix.os == 'macos-14'
51+
run: |
52+
brew tap ethereum/ethereum
53+
brew install ethereum
54+
55+
- name: Machete
56+
uses: bnjbvr/[email protected]
57+
58+
- name: Format
59+
run: make format
60+
61+
- name: Clippy
62+
run: make clippy
63+
64+
- name: Test cargo workspace
65+
run: make test

Cargo.lock

Lines changed: 0 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: format clippy test machete
2+
3+
format:
4+
cargo fmt --all -- --check
5+
6+
clippy:
7+
cargo clippy --all-features --workspace -- --deny warnings
8+
9+
test:
10+
cargo test --workspace -- --nocapture
11+
12+
machete:
13+
cargo install cargo-machete
14+
cargo machete

crates/core/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ revive-dt-config = { workspace = true }
1818
revive-dt-format = { workspace = true }
1919
revive-dt-node = { workspace = true }
2020
revive-dt-node-interaction = { workspace = true }
21-
revive-dt-solc-binaries = { workspace = true }
2221

2322
alloy = { workspace = true }
2423
anyhow = { workspace = true }
@@ -27,7 +26,4 @@ log = { workspace = true }
2726
env_logger = { workspace = true }
2827
rayon = { workspace = true }
2928
revive-solc-json-interface = { workspace = true }
30-
semver = { workspace = true }
31-
serde = { workspace = true, features = [ "derive" ] }
32-
serde_json = { workspace = true }
3329
temp-dir = { workspace = true }

crates/node-interaction/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ rust-version.workspace = true
1111
[dependencies]
1212
alloy = { workspace = true }
1313
anyhow = { workspace = true }
14-
hex = { workspace = true }
1514
log = { workspace = true }
1615
once_cell = { workspace = true }
17-
serde_json = { workspace = true }
1816
tokio = { workspace = true }

crates/node/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ rust-version.workspace = true
1212
anyhow = { workspace = true }
1313
alloy = { workspace = true }
1414
log = { workspace = true }
15-
serde_json = { workspace = true }
1615

1716
revive-dt-node-interaction = { workspace = true }
1817
revive-dt-config = { workspace = true }

crates/solc-binaries/src/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fn download_to_file(path: &Path, downloader: &GHDownloader) -> anyhow::Result<()
6060
std::process::Command::new("xattr")
6161
.arg("-d")
6262
.arg("com.apple.quarantine")
63-
.arg(&path)
63+
.arg(path)
6464
.stderr(std::process::Stdio::null())
6565
.stdout(std::process::Stdio::null())
6666
.stdout(std::process::Stdio::null())

0 commit comments

Comments
 (0)