Skip to content

Commit

Permalink
Try to fix rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
imbillow committed May 10, 2024
1 parent e152be3 commit 3d803d2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check rizin
uses: actions/checkout@master
with:
repository: rizinorg/rizin
ref: refs/heads/dev
path: rizin
- name: Build rizin
run: |
cd rizin
pip install meson
meson setup --debug --buildtype=release --prefix=(realpath $HOME/.local) build
ninja install -C build
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
Expand Down
13 changes: 5 additions & 8 deletions il-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,22 @@ impl Display for Instruction {
}

const INST_LIMIT: usize = 0x8_usize;
const MAX: u32 = u16::MAX as _;
const MAX: u32 = u32::MAX;
const ADDRS: [usize; 2] = [0, 0xff00];

fn main() -> Result<(), Box<dyn Error>> {
let n = MAX / (rayon::current_num_threads() as u32);
let map = Arc::new(DashMap::<String, usize>::new());
let core = Arc::new(Mutex::new({
let core = Arc::new({
let core = Core::new();
core.set("analysis.arch", "pic").unwrap();
core.set("analysis.cpu", "pic18").unwrap();
core
}));
let runner = |core: Arc<Mutex<Core>>, map: Arc<DashMap<String, usize>>, x: u32| {
});
let runner = |core: Arc<Core>, map: Arc<DashMap<String, usize>>, x: u32| {
let b: [u8; 4] = x.to_le_bytes();
for addr in ADDRS {
let inst = {
let core = core.lock().unwrap();
Instruction::from_bytes(&core, &b, addr)
};
let inst = { Instruction::from_bytes(&core, &b, addr) };
if inst.is_err() {
continue;
}
Expand Down

0 comments on commit 3d803d2

Please sign in to comment.