From 15bfb4b31f56853be116e558dd3307e79823ced5 Mon Sep 17 00:00:00 2001 From: Fabien PICHOT Date: Thu, 4 Jan 2024 16:14:48 +0800 Subject: [PATCH] try to run CI on github actions --- .github/workflows/main.yml | 16 ++++++++++++++++ regress/CMakeLists.txt | 5 ++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b0465c5 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +name: main +on: [push, pull_request] +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - uses: actions/checkout@v2 + - name: configure + run: cmake -B build -D CMAKE_BUILD_TYPE=Release + - name: build + run: cmake --build build --parallel 2 + - name: test + run: cd build && ctest -VV \ No newline at end of file diff --git a/regress/CMakeLists.txt b/regress/CMakeLists.txt index afa1117..ad74745 100644 --- a/regress/CMakeLists.txt +++ b/regress/CMakeLists.txt @@ -14,10 +14,9 @@ foreach(SOURCE_FILE ${ALL_C_TESTS}) COMMAND $) endforeach(SOURCE_FILE) -# Shell based tests (needs a posix shell and `ip' command) +# Shell based tests (needs a posix shell) # ----------------- -find_program(IP_COMMAND ip) -if (IP_COMMAND) +if (UNIX) file(GLOB ALL_SH_TESTS test*.sh) foreach(SOURCE_FILE ${ALL_SH_TESTS}) get_filename_component(TEST_NAME ${SOURCE_FILE} NAME_WE)