Browse Source

Uses python 3.10 that fixes an error on windows: https://github.com/actions/runner-images/issues/2690

tags/v0.3.1-rc5
haixuanTao 2 years ago
parent
commit
46e56da469
2 changed files with 12 additions and 18 deletions
  1. +10
    -0
      .github/workflows/ci.yml
  2. +2
    -18
      libraries/core/src/lib.rs

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

@@ -132,8 +132,13 @@ jobs:

# python examples
- uses: actions/setup-python@v2
if: runner.os != 'Windows'
with:
python-version: "3.8"
- uses: actions/setup-python@v2
if: runner.os == 'Windows'
with:
python-version: "3.10"
- name: "Python Dataflow example"
run: cargo run --example python-dataflow
- name: "Python Operator Dataflow example"
@@ -167,8 +172,13 @@ jobs:
source /opt/ros/humble/setup.bash && ros2 run turtlesim turtlesim_node &
cargo run --example rust-ros2-dataflow --features="ros2-examples"
- uses: actions/setup-python@v2
if: runner.os != 'Windows'
with:
python-version: "3.8"
- uses: actions/setup-python@v2
if: runner.os == 'Windows'
with:
python-version: "3.10"
- name: "python-ros2-dataflow"
timeout-minutes: 30
env:


+ 2
- 18
libraries/core/src/lib.rs View File

@@ -61,24 +61,8 @@ pub async fn run<S>(program: S, args: &[&str], pwd: Option<&Path>) -> eyre::Resu
where
S: AsRef<OsStr>,
{
// if platform is windows, use a shell
let mut run = if cfg!(windows) {
let mut run = tokio::process::Command::new("cmd.exe");
let mut wrapped_args = vec![
"/c",
program
.as_ref()
.to_str()
.context("Could not get path string")?,
];
wrapped_args.extend(args);
run.args(wrapped_args);
run
} else {
let mut run = tokio::process::Command::new(program);
run.args(args);
run
};
let mut run = tokio::process::Command::new(program);
run.args(args);

if let Some(pwd) = pwd {
run.current_dir(pwd);


Loading…
Cancel
Save