Skip to content

Commit 30662ea

Browse files
author
LAGNEAU Romain
committed
[CI] Changed compilation and ctest commands
1 parent f73469c commit 30662ea

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/macos-linux-namespace.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MacOS
1+
name: MacOS-Linux-Namespace
22

33
# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events
44
on:
@@ -18,6 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: ["ubuntu-latest", "macos-latest"]
21+
build_type: [Release]
2122

2223
steps:
2324
- name: Checkout repository
@@ -95,10 +96,20 @@ jobs:
9596
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
9697
cat ViSP-third-party.txt
9798
99+
- name: Determine number of processor on Ubuntu
100+
if: matrix.os == 'ubuntu-latest'
101+
run: |
102+
echo "NPROC=$(nproc)" >> $GITHUB_ENV
103+
104+
- name: Determine number of processor on MacOS
105+
if: matrix.os == 'macos-latest'
106+
run: |
107+
echo "NPROC=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV
108+
98109
- name: Compile
99110
working-directory: build
100-
run: make -j$(sysctl -n hw.logicalcpu) install
111+
run: make -j${NPROC} install
101112

102113
- name: Run unit tests
103114
working-directory: build
104-
run: ctest -j$(sysctl -n hw.logicalcpu) --output-on-failure -V
115+
run: ctest -j${NPROC} --output-on-failure -V

0 commit comments

Comments
 (0)