In https://github.com/rstudio/r-builds/pull/133, I missed an update to the PCRE lib dependencies for RHEL 9. The R 3.5/3.6 builds require both PCRE1 and PCRE2, but only PCRE1 was a dependency, so the tests failed when installing the test package.
But unfortunately, the exit codes from the tests weren't being propagated correctly, so CI wasn't catching this earlier. (I only realized this while adding the R Docker images in https://github.com/rstudio/r-docker/pull/85, which I also forgot to add CI support for, oops)
Fix exit code propagation by using docker-compose run instead of docker-compose up, which exits with a 0 even if the container exits with a non-zero exit code. docker-compose up has a --abort-on-container-exit flag to propagate the exit code I think, but docker-compose run makes more sense anyway, and can automatically clean up containers as well.
With docker-compose run, a non-zero exit code is returned when the container errors out:
$ R_VERSION=3.5.3 make test-r-rhel-9
...
/usr/bin/ld: cannot find -lpcre2-8
collect2: error: ld returned 1 exit status
make: *** [/opt/R/3.5.3/lib/R/share/make/shlib.mk:6: testpkg.so] Error 1
ERROR: compilation failed for package 'testpkg'
removing '/tmp/Rtmpp03xp3/testpkg'
Warning message:
In install.packages(file.path(curr_dir, "testpkg"), repos = NULL, :
installation of package '/r-builds/test/testpkg' had non-zero exit status
Error in library(testpkg) : there is no package called 'testpkg'
Calls: source -> withVisible -> eval -> eval -> library
Execution halted
ERROR: 1
make: *** [Makefile:58: test-r-rhel-9] Error 1
$ echo $?
2
- Fix the missing PCRE2 dependency for R 3.5/3.6 RHEL 9 builds
In https://github.com/rstudio/r-builds/pull/133, I missed an update to the PCRE lib dependencies for RHEL 9. The R 3.5/3.6 builds require both PCRE1 and PCRE2, but only PCRE1 was a dependency, so the tests failed when installing the test package.
But unfortunately, the exit codes from the tests weren't being propagated correctly, so CI wasn't catching this earlier. (I only realized this while adding the R Docker images in https://github.com/rstudio/r-docker/pull/85, which I also forgot to add CI support for, oops)
Fix exit code propagation by using
docker-compose run
instead ofdocker-compose up
, which exits with a0
even if the container exits with a non-zero exit code.docker-compose up
has a--abort-on-container-exit
flag to propagate the exit code I think, butdocker-compose run
makes more sense anyway, and can automatically clean up containers as well.With
docker-compose run
, a non-zero exit code is returned when the container errors out:$ echo $? 2