From 95d8836cbc789b1be70498bde763b353b6a22b0a Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Wed, 1 Apr 2020 18:10:25 +0200 Subject: [PATCH] [#6] Added CMake only build plan Signed-off-by: Clovis Durand --- .github/workflows/cmake-build.yml | 53 +++++++++++++++++++ .../{build.yml => electron-build.yml} | 0 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/cmake-build.yml rename .github/workflows/{build.yml => electron-build.yml} (100%) diff --git a/.github/workflows/cmake-build.yml b/.github/workflows/cmake-build.yml new file mode 100644 index 0000000..77440fe --- /dev/null +++ b/.github/workflows/cmake-build.yml @@ -0,0 +1,53 @@ +name: Generator project build plan +#author: Clovis Durand +#description: GitHub action to buid the OSCO-OD-Gen project + +on: [push] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + # TODO : Make this work for Windows + # os: [ubuntu-latest, macOS-latest, windows-latest] + os: [ubuntu-latest, macOS-latest] + package_manager: [npm] + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Checkout submodules + run: | + git submodule sync --recursive + git submodule update --init --recursive + + - name: Installing dependencies (macOS) + if: matrix.os == 'macOS-latest' + run: | + set -x + brew update + brew install doxygen graphviz coreutils pkg-config + ln -s /usr/local/bin/greadlink /usr/local/bin/readlink + + - name: Build C generator project + if: matrix.os != 'windows-latest' + run: | + mkdir build/ + cd build/ + cmake ../generator + cmake --build . + + - name: Build C generator project (Windows) + if: matrix.os == 'windows-latest' + run: | + mkdir build + cd build/ + cmake ../generator -DCMAKE_C_FLAGS=/w34716 -DCMAKE_CXX_FLAGS=/w34716 + cmake --build . + + - name: Test project (CTest) + run: | + cd build/ + ctest -VV diff --git a/.github/workflows/build.yml b/.github/workflows/electron-build.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/electron-build.yml