From 9dd6bfd031aa2fdca87757f98571bc846b6e40c3 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Thu, 28 Sep 2023 15:17:12 +1000 Subject: [PATCH 1/3] Refactor test --- examples/test.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/test.sh b/examples/test.sh index 8be627e..ef2dd1d 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -4,10 +4,9 @@ set -ex cargo build -for cargo_file in */Cargo.toml -do - target/debug/$(dirname $cargo_file) & - pid=$! - sleep 10 - kill $pid +for cargo_file in */Cargo.toml; do + target/debug/$(dirname $cargo_file) & + pid=$! + sleep 20 + kill $pid done From 10e16366d70c9a5d29302452d20a784812d86cb3 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Thu, 28 Sep 2023 15:48:03 +1000 Subject: [PATCH 2/3] Refactor example test (#289) --- .github/workflows/test.yaml | 11 +++++++---- examples/test.sh | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 37dd1c4..1283c4b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,15 +22,18 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo test examples: - runs-on: ubuntu-latest + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 with: submodules: true - uses: Swatinem/rust-cache@v2 - - run: | - cd examples - ./test.sh + - run: examples/test.sh cmake: runs-on: ubuntu-latest steps: diff --git a/examples/test.sh b/examples/test.sh index ef2dd1d..a5569b1 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -2,10 +2,10 @@ set -ex -cargo build +cd $(dirname $0) for cargo_file in */Cargo.toml; do - target/debug/$(dirname $cargo_file) & + cargo run --bin $(dirname $cargo_file) & pid=$! sleep 20 kill $pid From 21b6fb35fff336e3299a357db6db12b94ed53149 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Thu, 28 Sep 2023 15:52:43 +1000 Subject: [PATCH 3/3] Fix examples test (#290) --- .github/workflows/test.yaml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1283c4b..6c910e6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -22,12 +22,7 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo test examples: - strategy: - matrix: - os: - - ubuntu-latest - - macos-latest - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: