Skip to content

Commit ba5eb12

Browse files
authored
Merge pull request #1 from vr1087/fix/ci-yml
Fix CI workflow: remove invalid runner.ncpu expression
2 parents 646ab84 + 75c918e commit ba5eb12

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ on:
1111
jobs:
1212
build-and-test:
1313
runs-on: ubuntu-latest
14-
env:
15-
# Make sure parallel builds use all available cores
16-
NUM_CORES: ${{ runner.ncpu }}
1714

1815
steps:
1916
- name: Check out repository
@@ -29,16 +26,15 @@ jobs:
2926
sudo apt-get install -y build-essential cmake git python3-dev python3-pip
3027
3128
- name: Configure and build C++ code
32-
working-directory: ${{ github.workspace }}
3329
run: |
3430
mkdir -p build
3531
cd build
3632
cmake .. -DCMAKE_BUILD_TYPE=Release
37-
cmake --build . --parallel "${NUM_CORES}"
33+
cmake --build . --parallel $(nproc)
3834
3935
- name: Run C++ unit tests with CTest
40-
working-directory: ${{ github.workspace }}/build
4136
run: |
37+
cd build
4238
ctest --output-on-failure
4339
4440
# -----------------------------
@@ -57,13 +53,11 @@ jobs:
5753
python -m pip install --upgrade pip setuptools scikit-build pytest
5854
5955
- name: Install package (C++ + Python wrapper) via pip
60-
working-directory: ${{ github.workspace }}
6156
run: |
6257
source venv/bin/activate
6358
pip install .
6459
6560
- name: Run Python unit tests
66-
working-directory: ${{ github.workspace }}
6761
run: |
6862
source venv/bin/activate
6963
pytest -q

0 commit comments

Comments
 (0)