diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-12-20 13:59:07 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-12-20 13:59:07 +0100 |
commit | 45cc578e67e8aab2caf9f34e63e00b9a490cd8ee (patch) | |
tree | 81ac0c5b97e10191211ffefa94f3750386a3f795 /contrib/ci | |
parent | c304d40f96bb7b8d2111a76a4fc21a9ee6ae4c6f (diff) |
[ci] use podman only; make -j(#cpu/2)
Diffstat (limited to 'contrib/ci')
-rwxr-xr-x | contrib/ci/ci.sh | 5 | ||||
-rwxr-xr-x | contrib/ci/jobs/1-build/build.sh | 2 | ||||
-rw-r--r-- | contrib/ci/jobs/1-build/config.ini | 2 | ||||
-rw-r--r-- | contrib/ci/jobs/2-test/config.ini | 2 | ||||
-rwxr-xr-x | contrib/ci/jobs/2-test/test.sh | 4 | ||||
-rw-r--r-- | contrib/ci/jobs/3-docs/config.ini | 2 |
6 files changed, 11 insertions, 6 deletions
diff --git a/contrib/ci/ci.sh b/contrib/ci/ci.sh index 47c7a211e..dd7277c01 100755 --- a/contrib/ci/ci.sh +++ b/contrib/ci/ci.sh @@ -1,9 +1,8 @@ #!/bin/bash set -exvuo pipefail -# Use podman if available, otherwise use docker. -# Fails if neither is found in PATH -OCI_RUNTIME=$(which podman || which docker) +# Use podman, fails if it isn't found in PATH +OCI_RUNTIME=$(which podman) REPO_NAME=$(basename "${PWD}") JOB_NAME="${1}" JOB_CONTAINER=$((grep CONTAINER_NAME contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "${REPO_NAME}") diff --git a/contrib/ci/jobs/1-build/build.sh b/contrib/ci/jobs/1-build/build.sh index 35faf0ac5..d3fcfab85 100755 --- a/contrib/ci/jobs/1-build/build.sh +++ b/contrib/ci/jobs/1-build/build.sh @@ -9,4 +9,6 @@ apt-get upgrade -yqq --enable-logging=verbose \ --disable-doc +nump=$(grep processor /proc/cpuinfo | wc -l) +make -j$(( $nump / 2 )) make diff --git a/contrib/ci/jobs/1-build/config.ini b/contrib/ci/jobs/1-build/config.ini new file mode 100644 index 000000000..c21915a0b --- /dev/null +++ b/contrib/ci/jobs/1-build/config.ini @@ -0,0 +1,2 @@ +[build] +CONTAINER_NAME = localhost/exchange diff --git a/contrib/ci/jobs/2-test/config.ini b/contrib/ci/jobs/2-test/config.ini index c5a77c031..49cc8ea8a 100644 --- a/contrib/ci/jobs/2-test/config.ini +++ b/contrib/ci/jobs/2-test/config.ini @@ -2,5 +2,5 @@ HALT_ON_FAILURE = False WARN_ON_FAILURE = True CONTAINER_BUILD = True -CONTAINER_NAME = exchange +CONTAINER_NAME = localhost/exchange CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/2-test/test.sh b/contrib/ci/jobs/2-test/test.sh index 4c4142309..3681f51cb 100755 --- a/contrib/ci/jobs/2-test/test.sh +++ b/contrib/ci/jobs/2-test/test.sh @@ -8,7 +8,9 @@ apt-get upgrade -yqq ./configure CFLAGS="-ggdb -O0" \ --enable-logging=verbose \ --disable-doc -make + +nump=$(grep processor /proc/cpuinfo | wc -l) +make -j$(( $nump / 2 )) make install sudo -u postgres /usr/lib/postgresql/15/bin/postgres -D /etc/postgresql/15/main -h localhost -p 5432 & diff --git a/contrib/ci/jobs/3-docs/config.ini b/contrib/ci/jobs/3-docs/config.ini index c5a77c031..49cc8ea8a 100644 --- a/contrib/ci/jobs/3-docs/config.ini +++ b/contrib/ci/jobs/3-docs/config.ini @@ -2,5 +2,5 @@ HALT_ON_FAILURE = False WARN_ON_FAILURE = True CONTAINER_BUILD = True -CONTAINER_NAME = exchange +CONTAINER_NAME = localhost/exchange CONTAINER_ARCH = amd64 |