cirrus: set PATH correctly on macOS, fix second nproc
diff --git a/.cirrus/step-macos-prepare.sh b/.cirrus/step-macos-prepare.sh
index 8323cf2..362c9f2 100755
--- a/.cirrus/step-macos-prepare.sh
+++ b/.cirrus/step-macos-prepare.sh
@@ -16,10 +16,11 @@
cd iverilog
autoconf
./configure --prefix=$HOME/.local-bin
-make -j $(nproc)
+make -j 4
make install
# Configure new PATH
-export PATH="$HOME/.local-bin/bin:$PATH"
-export PATH="/usr/local/opt/ccache/libexec:$PATH"
+cat >>$HOME/.bash_profile <<'EOF'
+export PATH="/usr/local/opt/ccache/libexec:$HOME/.local-bin/bin:$PATH"
+EOF
diff --git a/.cirrus/step-test.sh b/.cirrus/step-test.sh
index f479886..e7ddb7e 100755
--- a/.cirrus/step-test.sh
+++ b/.cirrus/step-test.sh
@@ -2,4 +2,9 @@
set -e -x
-make -j $(nproc) test
+ncpu=4
+if nproc; then
+ ncpu=$(nproc)
+fi
+
+make -j ${ncpu} test