rstudio / actions

GitHub Actions for use with RStudio software.
MIT License
7 stars 11 forks source link

rsconnect not found after running setup-rsconnect #34

Open aodhan-domhnaill opened 8 months ago

aodhan-domhnaill commented 8 months ago

When running these steps,

    steps:
      - uses: actions/setup-python@v2
      - uses: r-lib/actions/setup-r@v2-branch
        with:
          r-version: 4.2.3
          use-public-rspm: true
      - uses: rstudio/actions/setup-connect@main
      - uses: actions/checkout@v3

      - shell: bash
        run: cd src && Rscript -e 'rsconnect::writeManifest()'

Got,

Run cd src && Rscript -e 'rsconnect::writeManifest()'
Error: Error in loadNamespace(x) : there is no package called 'rsconnect'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Error: Process completed with exit code 1.

Shouldn't rsconnect be installed?

aodhan-domhnaill commented 8 months ago

I think this might be the issue,

R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
tools/version.c:1:10: fatal error: openssl/opensslv.h: No such file or directory
    1 | #include <openssl/opensslv.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package 'openssl'
* removing '/home/runner/_work/_temp/Library/openssl'

The downloaded source packages are in
    '/tmp/RtmpcJ6jBP/downloaded_packages'
Installing package into '/home/runner/_work/_temp/Library'
(as 'lib' is unspecified)
ERROR: dependencies 'curl', 'openssl' are not available for package 'rsconnect'
* removing '/home/runner/_work/_temp/Library/rsconnect'
Warning messages:
1: In i.p(...) : installation of package 'curl' had non-zero exit status
2: In i.p(...) :
  installation of package 'openssl' had non-zero exit status
3: In i.p(...) :
  installation of package '/tmp/RtmpcJ6jBP/remotes13e96fb89254/rsconnect' had non-zero exit status
Installed rsconnect

Looking at the code, it seems to not catch the exit status correctly https://github.com/rstudio/actions/blob/main/setup-connect/src/setup-connect.ts#L62