Message ID | 20201030211327.111834-1-omosnace@redhat.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Ondrej Mosnáček |
Headers | show |
Series | [userspace,v2] ci: use parallel build | expand |
On Fri, Oct 30, 2020 at 4:14 PM Ondrej Mosnacek <omosnace@redhat.com> wrote: > > Pass -j$(nproc) to all make invocations to make the CI run a little > faster. > > Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> > --- > > v2: use POSIX $() instead of `` > > .travis.yml | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/.travis.yml b/.travis.yml > index bd3c9842..8ea6cc74 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -74,7 +74,7 @@ install: > - tar -C "$TRAVIS_BUILD_DIR" -xvjf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" > # Make refpolicy Makefile use the new toolchain when building modules > - sed -e "s,^PREFIX :=.*,PREFIX := \$(DESTDIR)/usr," -i "$TRAVIS_BUILD_DIR/refpolicy/support/Makefile.devel" > - - sudo make -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers > + - sudo make -j$(nproc) -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers > - sudo rm -rf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" "$TRAVIS_BUILD_DIR/refpolicy" > - sudo mkdir -p /etc/selinux > - echo 'SELINUXTYPE=refpolicy' | sudo tee /etc/selinux/config > @@ -129,12 +129,12 @@ before_script: > > script: > # Start by installing everything into $DESTDIR > - - make install $EXPLICIT_MAKE_VARS -k > - - make install-pywrap $EXPLICIT_MAKE_VARS -k > - - make install-rubywrap $EXPLICIT_MAKE_VARS -k > + - make -j$(nproc) install $EXPLICIT_MAKE_VARS -k > + - make -j$(nproc) install-pywrap $EXPLICIT_MAKE_VARS -k > + - make -j$(nproc) install-rubywrap $EXPLICIT_MAKE_VARS -k > > # Now that everything is installed, run "make all" to build everything which may have not been built > - - make all $EXPLICIT_MAKE_VARS -k > + - make -j$(nproc) all $EXPLICIT_MAKE_VARS -k > > # Set up environment variables for the tests > - . ./scripts/env_use_destdir > -- > 2.26.2 > Ack
On Sat, Oct 31, 2020 at 12:05 AM William Roberts <bill.c.roberts@gmail.com> wrote: > > On Fri, Oct 30, 2020 at 4:14 PM Ondrej Mosnacek <omosnace@redhat.com> wrote: > > > > Pass -j$(nproc) to all make invocations to make the CI run a little > > faster. > > > > Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> > > --- > > > > v2: use POSIX $() instead of `` > > > > .travis.yml | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/.travis.yml b/.travis.yml > > index bd3c9842..8ea6cc74 100644 > > --- a/.travis.yml > > +++ b/.travis.yml > > @@ -74,7 +74,7 @@ install: > > - tar -C "$TRAVIS_BUILD_DIR" -xvjf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" > > # Make refpolicy Makefile use the new toolchain when building modules > > - sed -e "s,^PREFIX :=.*,PREFIX := \$(DESTDIR)/usr," -i "$TRAVIS_BUILD_DIR/refpolicy/support/Makefile.devel" > > - - sudo make -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers > > + - sudo make -j$(nproc) -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers > > - sudo rm -rf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" "$TRAVIS_BUILD_DIR/refpolicy" > > - sudo mkdir -p /etc/selinux > > - echo 'SELINUXTYPE=refpolicy' | sudo tee /etc/selinux/config > > @@ -129,12 +129,12 @@ before_script: > > > > script: > > # Start by installing everything into $DESTDIR > > - - make install $EXPLICIT_MAKE_VARS -k > > - - make install-pywrap $EXPLICIT_MAKE_VARS -k > > - - make install-rubywrap $EXPLICIT_MAKE_VARS -k > > + - make -j$(nproc) install $EXPLICIT_MAKE_VARS -k > > + - make -j$(nproc) install-pywrap $EXPLICIT_MAKE_VARS -k > > + - make -j$(nproc) install-rubywrap $EXPLICIT_MAKE_VARS -k > > > > # Now that everything is installed, run "make all" to build everything which may have not been built > > - - make all $EXPLICIT_MAKE_VARS -k > > + - make -j$(nproc) all $EXPLICIT_MAKE_VARS -k > > > > # Set up environment variables for the tests > > - . ./scripts/env_use_destdir > > -- > > 2.26.2 > > > > Ack Thanks, applied now: https://github.com/SELinuxProject/selinux/commit/4dd74ded5b7078e203a64583fc23dbca2858bb88
diff --git a/.travis.yml b/.travis.yml index bd3c9842..8ea6cc74 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,7 +74,7 @@ install: - tar -C "$TRAVIS_BUILD_DIR" -xvjf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" # Make refpolicy Makefile use the new toolchain when building modules - sed -e "s,^PREFIX :=.*,PREFIX := \$(DESTDIR)/usr," -i "$TRAVIS_BUILD_DIR/refpolicy/support/Makefile.devel" - - sudo make -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers + - sudo make -j$(nproc) -C "$TRAVIS_BUILD_DIR/refpolicy" install-headers - sudo rm -rf "$TRAVIS_BUILD_DIR/refpolicy.tar.bz2" "$TRAVIS_BUILD_DIR/refpolicy" - sudo mkdir -p /etc/selinux - echo 'SELINUXTYPE=refpolicy' | sudo tee /etc/selinux/config @@ -129,12 +129,12 @@ before_script: script: # Start by installing everything into $DESTDIR - - make install $EXPLICIT_MAKE_VARS -k - - make install-pywrap $EXPLICIT_MAKE_VARS -k - - make install-rubywrap $EXPLICIT_MAKE_VARS -k + - make -j$(nproc) install $EXPLICIT_MAKE_VARS -k + - make -j$(nproc) install-pywrap $EXPLICIT_MAKE_VARS -k + - make -j$(nproc) install-rubywrap $EXPLICIT_MAKE_VARS -k # Now that everything is installed, run "make all" to build everything which may have not been built - - make all $EXPLICIT_MAKE_VARS -k + - make -j$(nproc) all $EXPLICIT_MAKE_VARS -k # Set up environment variables for the tests - . ./scripts/env_use_destdir
Pass -j$(nproc) to all make invocations to make the CI run a little faster. Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com> --- v2: use POSIX $() instead of `` .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)