diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94800057..1401fef1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,31 +6,47 @@ env: CARGO_TERM_COLOR: always jobs: - check: - name: Build ArkLib + linux: + name: Build on Linux runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - components: rustfmt, clippy - + components: rustfmt, clippy - name: Check run: cargo check - - name: Format run: | cargo fmt --all -- --check - cargo clippy - + cargo clippy - name: Build Debug run: cargo build --verbose - - name: Run tests run: cargo test --verbose - - name: Build Release run: cargo build --verbose --release + + windows: + name: Test on Windows + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose + + mac-intel: + name: Test on macOS Intel + runs-on: macos-11 + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose diff --git a/.github/workflows/main_branch.yml b/.github/workflows/main_branch.yml new file mode 100644 index 00000000..b7aa126b --- /dev/null +++ b/.github/workflows/main_branch.yml @@ -0,0 +1,54 @@ +name: Main Branch Workflow + +on: + push: + branches: + - main + schedule: + # Run each week + - cron: "0 0 * * 0" + +jobs: + linux: + name: Linux + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose --release + + windows: + name: Windows + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose --release + + mac-intel: + name: MacOS Intel + runs-on: macos-11 + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose --release + + mac-arm: + name: MacOS ARM + runs-on: macos-13-xlarge + + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + - name: Run tests + run: cargo test --workspace --verbose --release diff --git a/README.md b/README.md index 3b98deda..5cd05fef 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # ArkLib -This is the home of core ARK library. +
+ ARK Logo + +[![License](https://img.shields.io/github/license/ARK-Builders/ark-rust.svg)](LICENSE) +[![Build Status](https://github.com/ARK-Builders/ark-rust/actions/workflows/build.yml/badge.svg)](https://github.com/ARK-Builders/ark-rust/actions/workflows/build.yml) + +**The home of core ARK library** + +
Being implemented in Rust, it provides us capability to port all our apps to all common platforms. Right now, Android is supported by using the [arklib-android](https://github.com/arK-Builders/arklib-android) project. And for Linux/macOS/Windows, the library can be used as-is and easily embedded into an app, e.g. built with [Tauri](https://tauri.app/). Development docs will come sometime. diff --git a/data-pdf/build.rs b/data-pdf/build.rs index 7e869175..f74315ac 100644 --- a/data-pdf/build.rs +++ b/data-pdf/build.rs @@ -89,7 +89,7 @@ fn main() { } | OperatingSystem::Darwin => fs_extra::file::move_file( PathBuf::from(&out_dir) - .join("bin") + .join("lib") .join("libpdfium.dylib"), PathBuf::from(&out_dir).join("libpdfium.dylib"), &CopyOptions::new(), diff --git a/data-resource/Cargo.toml b/data-resource/Cargo.toml index bbd9292f..cd3c8ab1 100644 --- a/data-resource/Cargo.toml +++ b/data-resource/Cargo.toml @@ -21,7 +21,6 @@ anyhow = "1" [dev-dependencies] # benchmarking criterion = { version = "0.5", features = ["html_reports"] } -pprof = { version = "0.13", features = ["criterion", "flamegraph"] } rand = "0.8" [[bench]] diff --git a/data-resource/benches/compute_bytes_benchmark.rs b/data-resource/benches/compute_bytes_benchmark.rs index fccd0b89..c715a490 100644 --- a/data-resource/benches/compute_bytes_benchmark.rs +++ b/data-resource/benches/compute_bytes_benchmark.rs @@ -1,6 +1,5 @@ use criterion::{black_box, criterion_group, criterion_main, Criterion}; use data_resource::ResourceId; -use pprof::criterion::{Output, PProfProfiler}; use rand::prelude::*; use std::fs; @@ -66,7 +65,7 @@ fn compute_bytes_on_files_benchmark(c: &mut Criterion) { criterion_group!( name = benches; - config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None))); + config = Criterion::default(); targets = compute_bytes_on_raw_data, compute_bytes_on_files_benchmark ); criterion_main!(benches); diff --git a/fs-index/Cargo.toml b/fs-index/Cargo.toml index b7284d44..d43037bd 100644 --- a/fs-index/Cargo.toml +++ b/fs-index/Cargo.toml @@ -28,7 +28,6 @@ tempdir = "0.3.7" rstest = '0.18.2' # benchmarking criterion = { version = "0.5", features = ["html_reports"] } -pprof = { version = "0.13", features = ["criterion", "flamegraph"] } rand = "0.8" [[bench]] diff --git a/fs-index/benches/index_build_benchmark.rs b/fs-index/benches/index_build_benchmark.rs index dcdb7b2d..2d1abb7f 100644 --- a/fs-index/benches/index_build_benchmark.rs +++ b/fs-index/benches/index_build_benchmark.rs @@ -2,7 +2,6 @@ use criterion::{ black_box, criterion_group, criterion_main, BenchmarkId, Criterion, }; use fs_index::index::ResourceIndex; -use pprof::criterion::{Output, PProfProfiler}; const DIR_PATH: &str = "../test-assets/"; // Set the path to the directory containing the resources here @@ -36,7 +35,7 @@ fn index_build_benchmark(c: &mut Criterion) { criterion_group! { name = benches; - config = Criterion::default().with_profiler(PProfProfiler::new(100, Output::Flamegraph(None))); + config = Criterion::default(); targets = index_build_benchmark } criterion_main!(benches); diff --git a/logo.svg b/logo.svg new file mode 100644 index 00000000..09a5fe8d --- /dev/null +++ b/logo.svg @@ -0,0 +1 @@ + Ark-Logo-Only