Skip to content

Commit

Permalink
[CI] Changed compilation and ctest commands
Browse files Browse the repository at this point in the history
  • Loading branch information
LAGNEAU Romain committed Jul 17, 2024
1 parent f73469c commit 30662ea
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/macos-linux-namespace.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -18,6 +18,7 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
build_type: [Release]

steps:
- name: Checkout repository
Expand Down Expand Up @@ -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

0 comments on commit 30662ea

Please sign in to comment.