Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
adding option to rebuild libs
Browse files Browse the repository at this point in the history
  • Loading branch information
elinork committed Oct 25, 2023
1 parent fac1804 commit e9a82d6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
27 changes: 16 additions & 11 deletions .github/workflows/build-cloud-gov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
required: true
default: true
type: boolean
build_bins:
description: 'Also build binaries?'
required: true
default: false
type: boolean

permissions:
contents: write
Expand Down Expand Up @@ -112,28 +117,28 @@ jobs:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

- name: Run lib_tar.sh to extract each of the libraries needed by sf
if: ${{ env.needs_geo == 'true' }}
- name: Run lib_tar.sh to extract each of the libraries needed by sf
if: ${{ env.needs_geo == 'true' && inputs.build_bins == 'true' }}
run: |
if [ -d "r-lib" ]; then rm -fr r-lib; fi
mkdir r-lib
if [ -d "lib" ]; then rm -fr lib; fi
mkdir lib
chmod +x scripts/lib_tar.sh
for L in $LIBS
do
find / -iname $L 2>/dev/null | xargs -I {} scripts/lib_tar.sh {}
done
scripts/lib_tar.sh /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 # Another libsqlite3.so.0 exists on the image
git add r-lib
git add lib
env:
LIBS: libudunits2.so.0 libgeos_c.so libproj.so.22 proj.db libgdal.so.30

- name: Copy pandoc executable
if: ${{ env.needs_pandoc == 'true' }}
if: ${{ env.needs_pandoc == 'true' && inputs.build_bins == 'true' }}
run: |
if [ -d "r-bin" ]; then rm -fr r-bin; fi
mkdir r-bin
cp /usr/bin/pandoc r-bin
git add r-bin
if [ -d "bin" ]; then rm -fr bin; fi
mkdir bin
cp /usr/bin/pandoc bin
git add bin
- name: Add additional files to repo if not already there
run: |
Expand Down
4 changes: 2 additions & 2 deletions scripts/include/shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ library_path <- paste("Library Path: ", Sys.getenv(c("LD_LIBRARY_PATH")))
print(paste("LD_LIBRARY_PATH: ", library_path))

lib_dir <- "/home/vcap/deps/0/r/lib"
local_lib_dir <- "r-lib"
local_bin_dir <- "r-bin"
local_lib_dir <- "lib"
local_bin_dir <- "bin"

if (dir.exists(lib_dir)) {
if (dir.exists(local_lib_dir)) {
Expand Down

0 comments on commit e9a82d6

Please sign in to comment.