summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2021-06-18 21:07:10 -0700
committerGitHub <noreply@github.com>2021-06-19 04:07:10 +0000
commit34c5774e511ebb2e5e9672cb7381797c3cd6264e (patch)
tree5a730783bfc9f9414097f0f423b2b050b944b3ae
parentaf031c2938f753f555893b39c3cf1f7467b284fc (diff)
[CI] Build with all available cores (#6768)
macOS virtual machines have three available cores but we were only using two of them for our CI. This commit changes the CI to retrieve the number of available cores and then to use that to number to build and test cvc5.
-rw-r--r--.github/workflows/ci.yml14
1 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 95c6c035c..2a41efb59 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -82,6 +82,7 @@ jobs:
#
# https://github.com/actions/runner/blob/master/docs/adrs/0278-env-context.md#dont-populate-the-env-context-with-environment-variables-from-runner-machine
echo "image_version=$ImageVersion" >> $GITHUB_ENV
+ echo "num_proc=$(nproc)" >> $GITHUB_ENV
echo "/usr/lib/ccache" >> $GITHUB_PATH
# Note: macOS comes with a libedit; it does not need to brew-installed
@@ -103,6 +104,7 @@ jobs:
#
# https://github.com/actions/runner/blob/master/docs/adrs/0278-env-context.md#dont-populate-the-env-context-with-environment-variables-from-runner-machine
echo "image_version=$ImageVersion" >> $GITHUB_ENV
+ echo "num_proc=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV
echo "/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
- name: Install Python Dependencies
@@ -191,14 +193,14 @@ jobs:
--werror
- name: Build
- run: make -j2
+ run: make -j${{ env.num_proc }}
working-directory: build
- name: ccache Statistics
run: ccache -s
- name: Run CTest
- run: make -j2 check
+ run: make -j${{ env.num_proc }} check
env:
ARGS: --output-on-failure -LE regress[${{ matrix.exclude_regress }}]
CVC5_REGRESSION_ARGS: --no-early-exit
@@ -207,7 +209,7 @@ jobs:
- name: Install Check
run: |
- make -j2 install
+ make -j${{ env.num_proc }} install
echo -e "#include <cvc5/cvc5.h>\nint main() { cvc5::api::Solver s; return 0; }" > /tmp/test.cpp
g++ -std=c++11 /tmp/test.cpp -I install/include -L install/lib -lcvc5
working-directory: build
@@ -225,14 +227,14 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_PREFIX_PATH=$(pwd)/../../build/install/lib/cmake
- make -j2
- ctest -j2 --output-on-failure
+ make -j${{ env.num_proc }}
+ ctest -j${{ env.num_proc }} --output-on-failure
working-directory: examples
- name: Build Documentation
if: matrix.build-documentation
run: |
- make -j2 docs-gh
+ make -j${{ env.num_proc }} docs-gh
if [ "${{ github.event_name }}" == "pull_request" ] ; then
echo "${{ github.event.number }}" > docs/sphinx-gh/prnum
fi
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback