Skip to content

Commit

Permalink
change hyperdrive to edge
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton committed Apr 26, 2024
1 parent 67682f2 commit 87e363d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

# NOTE: This is needed to ensure that hyperdrive-wrappers builds correctly.
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: check out hyperdrive
uses: actions/checkout@main
uses: actions/checkout@v3
with:
repository: delvtech/hyperdrive
ref: "latest"
path: "./hyperdrive"

- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: build hyperdrive
run: cd hyperdrive && make build-sol

- uses: actions-rs/toolchain@v1
with:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,26 @@ jobs:
submodules: recursive
token: ${{ secrets.GITHUB_TOKEN }}

- name: check out hyperdrive
uses: actions/checkout@main
with:
repository: delvtech/hyperdrive
ref: "latest"
path: "./hyperdrive"

# NOTE: This is needed to ensure that hyperdrive-wrappers builds correctly.
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: check out hyperdrive
uses: actions/checkout@v3
with:
repository: delvtech/hyperdrive
path: "./hyperdrive"

- name: build hyperdrive
run: cd hyperdrive && make build-sol

- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy

- name: test
run: make test
8 changes: 7 additions & 1 deletion crates/hyperdrive-wrappers/build.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{io::Write, path::Path, process::Command};

use ethers::prelude::Abigen;
use eyre::Result;
use eyre::{eyre, Result};
use heck::ToSnakeCase;

const TARGETS: &[&str] = &[
Expand Down Expand Up @@ -58,6 +58,12 @@ const TARGETS: &[&str] = &[

fn get_artifacts(artifacts_path: &Path) -> Result<Vec<(String, String)>> {
let mut artifacts = Vec::new();
if !artifacts_path.exists() {
return Err(eyre!(
"artifacts_path={:#?} does not exist!",
artifacts_path
));
}
for entry in std::fs::read_dir(artifacts_path)? {
let entry = entry?;
let path = entry.path();
Expand Down

0 comments on commit 87e363d

Please sign in to comment.