Browse Source

Added example in CI

tags/v0.3.11-rc1
Mati-ur-rehman-017 haixuantao 10 months ago
parent
commit
c854cb188a
2 changed files with 39 additions and 3 deletions
  1. +20
    -0
      .github/workflows/ci.yml
  2. +19
    -3
      examples/c++-dataflow2/run.rs

+ 20
- 0
.github/workflows/ci.yml View File

@@ -127,6 +127,26 @@ jobs:
- name: "C++ Dataflow example"
timeout-minutes: 15
run: cargo run --example cxx-dataflow
- name: "Install Arrow C++ Library"
timeout-minutes: 10
shell: bash
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
# For Ubuntu
sudo apt-get update
sudo apt-get install -y -V ca-certificates lsb-release wget
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get install -y -V ./apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb
sudo apt-get update
sudo apt-get install -y -V libarrow-dev libarrow-glib-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
# For macOS
brew update
brew install apache-arrow
fi
- name: "C++ Dataflow2 example"
timeout-minutes: 15
run : cargo run --example cxx-dataflow2
- name: "Cmake example"
if: runner.os == 'Linux'
timeout-minutes: 30


+ 19
- 3
examples/c++-dataflow2/run.rs View File

@@ -247,7 +247,15 @@ async fn build_cxx_node(
clang.arg("-l").arg("c");
clang.arg("-l").arg("m");
}
clang.args(args);
for arg in args {
if arg.contains(" ") {
for part in arg.split_whitespace() {
clang.arg(part);
}
} else {
clang.arg(arg);
}
}
clang.arg("-L").arg(root.join("target").join("debug"));
clang
.arg("--output")
@@ -288,7 +296,15 @@ async fn build_cxx_operator(

let mut link = tokio::process::Command::new("clang++");
link.arg("-shared").args(&object_file_paths);
link.args(link_args);
for arg in link_args {
if arg.contains(" ") {
for part in arg.split_whitespace() {
link.arg(part);
}
} else {
link.arg(arg);
}
}
#[cfg(target_os = "windows")]
{
link.arg("-ladvapi32");
@@ -342,4 +358,4 @@ async fn build_cxx_operator(
};

Ok(())
}
}

Loading…
Cancel
Save