From 30662ea78480fed9ae54730fd154dcf07b051179 Mon Sep 17 00:00:00 2001 From: LAGNEAU Romain Date: Wed, 17 Jul 2024 14:28:09 +0200 Subject: [PATCH] [CI] Changed compilation and ctest commands --- .github/workflows/macos-linux-namespace.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos-linux-namespace.yml b/.github/workflows/macos-linux-namespace.yml index 2d87e290e9..304d7bd057 100644 --- a/.github/workflows/macos-linux-namespace.yml +++ b/.github/workflows/macos-linux-namespace.yml @@ -1,4 +1,4 @@ -name: MacOS +name: MacOS-Linux-Namespace # https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events on: @@ -18,6 +18,7 @@ jobs: fail-fast: false matrix: os: ["ubuntu-latest", "macos-latest"] + build_type: [Release] steps: - name: Checkout repository @@ -95,10 +96,20 @@ jobs: cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DENABLE_VISP_NAMESPACE=ON -DENABLE_EXPLICIT_KEYWORD=ON -DVISP_BUILD_DEPRECATED_FUNCTIONS=OFF cat ViSP-third-party.txt + - name: Determine number of processor on Ubuntu + if: matrix.os == 'ubuntu-latest' + run: | + echo "NPROC=$(nproc)" >> $GITHUB_ENV + + - name: Determine number of processor on MacOS + if: matrix.os == 'macos-latest' + run: | + echo "NPROC=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV + - name: Compile working-directory: build - run: make -j$(sysctl -n hw.logicalcpu) install + run: make -j${NPROC} install - name: Run unit tests working-directory: build - run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure -V + run: ctest -j${NPROC} --output-on-failure -V