Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: fix broken submodules checkout #621

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
matrix:
profile: [mainnet, testnet]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- run: cargo make --profile ${{ matrix.profile }} build
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
name: Format
runs-on: [self-hosted, light]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- name: Run cargo fmt
Expand All @@ -20,6 +23,9 @@ jobs:
name: Clippy
runs-on: [self-hosted, heavy]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- run: cargo make build-contracts
Expand All @@ -31,6 +37,9 @@ jobs:
name: Udeps
runs-on: [self-hosted, heavy]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- name: Run udeps
Expand All @@ -39,6 +48,9 @@ jobs:
name: Contracts
runs-on: [self-hosted, light]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- name: Run yarn lint
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/scheduled_lints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jobs:
name: Nightly Clippy
runs-on: [self-hosted, heavy]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- run: make etc/eth-contracts/res/EvmErc20.bin
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
name: Test suite (mainnet, testnet)
runs-on: [self-hosted, heavy]
steps:
- name: Potential broken submodules fix
run: |
git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :
- name: Clone the repository
uses: actions/checkout@v3
- name: Restore cache
Expand Down
30 changes: 15 additions & 15 deletions engine-precompiles/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ mod tests {
struct MockPrecompile;

impl Precompile for MockPrecompile {
fn required_gas(input: &[u8]) -> Result<EthGas, ExitError>
fn required_gas(_input: &[u8]) -> Result<EthGas, ExitError>
where
Self: Sized,
{
Expand All @@ -511,10 +511,10 @@ mod tests {

fn run(
&self,
input: &[u8],
target_gas: Option<EthGas>,
context: &Context,
is_static: bool,
_input: &[u8],
_target_gas: Option<EthGas>,
_context: &Context,
_is_static: bool,
) -> EvmPrecompileResult {
Ok(PrecompileOutput::default())
}
Expand All @@ -533,17 +533,17 @@ mod tests {
impl PrecompileHandle for MockPrecompileHandle {
fn call(
&mut self,
to: H160,
transfer: Option<Transfer>,
input: Vec<u8>,
gas_limit: Option<u64>,
is_static: bool,
context: &Context,
_to: H160,
_transfer: Option<Transfer>,
_input: Vec<u8>,
_gas_limit: Option<u64>,
_is_static: bool,
_context: &Context,
) -> (ExitReason, Vec<u8>) {
unimplemented!()
}

fn record_cost(&mut self, cost: u64) -> Result<(), ExitError> {
fn record_cost(&mut self, _cost: u64) -> Result<(), ExitError> {
unimplemented!()
}

Expand All @@ -553,9 +553,9 @@ mod tests {

fn log(
&mut self,
address: H160,
topics: Vec<aurora_engine_types::H256>,
data: Vec<u8>,
_address: H160,
_topics: Vec<aurora_engine_types::H256>,
_data: Vec<u8>,
) -> Result<(), ExitError> {
unimplemented!()
}
Expand Down
6 changes: 4 additions & 2 deletions engine/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,8 @@ mod tests {
attached_balance: Default::default(),
attached_gas: Default::default(),
};
let actual_id = schedule_promise(&mut promise_tracker, &args);
// This is safe because it's just a test
let actual_id = unsafe { schedule_promise(&mut promise_tracker, &args) };
let actual_scheduled_promises = promise_tracker.scheduled_promises;
let expected_scheduled_promises = {
let mut map = HashMap::new();
Expand All @@ -2155,7 +2156,8 @@ mod tests {
attached_gas: Default::default(),
};
let base_id = PromiseId::new(6);
let actual_id = schedule_promise_callback(&mut promise_tracker, base_id, &args);
// This is safe because it's just a test
let actual_id = unsafe { schedule_promise_callback(&mut promise_tracker, base_id, &args) };
let actual_scheduled_promises = promise_tracker.scheduled_promises;
let expected_scheduled_promises = {
let mut map = HashMap::new();
Expand Down