Skip to content

Commit

Permalink
feat(ci): add macos intel and windows jobs
Browse files Browse the repository at this point in the history
Signed-off-by: Tarek <[email protected]>
  • Loading branch information
tareknaser committed Apr 27, 2024
1 parent 7b1428b commit a7ebaa6
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 17 deletions.
47 changes: 37 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,58 @@ 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 --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 --verbose

mac-arm:
name: Test on 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 --verbose
2 changes: 1 addition & 1 deletion data-pdf/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
1 change: 0 additions & 1 deletion data-resource/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
3 changes: 1 addition & 2 deletions data-resource/benches/compute_bytes_benchmark.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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);
1 change: 0 additions & 1 deletion fs-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]]
Expand Down
3 changes: 1 addition & 2 deletions fs-index/benches/index_build_benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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);

0 comments on commit a7ebaa6

Please sign in to comment.