Limited number of cores on Github Actions
This commit is contained in:
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -18,5 +18,5 @@ jobs:
|
|||||||
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
|
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
|
||||||
- name: Build and unit test
|
- name: Build and unit test
|
||||||
run: |
|
run: |
|
||||||
make debug
|
NUMPROC=2 make debug
|
||||||
make test
|
make test
|
||||||
|
|||||||
5
Makefile
5
Makefile
@@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
.DEFAULT_GOAL := debug
|
.DEFAULT_GOAL := debug
|
||||||
|
|
||||||
|
NUMPROC ?= $(shell nproc)
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf debug release
|
rm -rf debug release
|
||||||
@@ -35,7 +37,8 @@ release/CMakeLists.txt:
|
|||||||
-DCMAKE_BUILD_TYPE=Release
|
-DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
debug: debug/CMakeLists.txt
|
debug: debug/CMakeLists.txt
|
||||||
make -C debug -j
|
echo "Using ${NUMPROC} cores"
|
||||||
|
make -C debug -j$(NUMPROC)
|
||||||
|
|
||||||
release: release/CMakeLists.txt
|
release: release/CMakeLists.txt
|
||||||
make -C release -j
|
make -C release -j
|
||||||
|
|||||||
Reference in New Issue
Block a user