install dependencies on linux #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gh-pages | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- andy_pkgdown_roracle | |
jobs: | |
pkgdown: | |
runs-on: ubuntu-latest | |
# Only restrict concurrency for non-PR jobs | |
concurrency: | |
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.3.1' | |
- name: install Oracle instant client | |
run: | | |
sudo apt update | |
sudo apt-get install -y alien libaio1 libaio-dev | |
wget https://download.oracle.com/otn_software/linux/instantclient/2112000/oracle-instantclient-basic-21.12.0.0.0-1.el8.x86_64.rpm | |
wget https://download.oracle.com/otn_software/linux/instantclient/2112000/oracle-instantclient-devel-21.12.0.0.0-1.el8.x86_64.rpm | |
wget https://download.oracle.com/otn_software/linux/instantclient/2112000/oracle-instantclient-odbc-21.12.0.0.0-1.el8.x86_64.rpm | |
wget https://download.oracle.com/otn_software/linux/instantclient/2112000/oracle-instantclient-sqlplus-21.12.0.0.0-1.el8.x86_64.rpm | |
sudo alien -i oracle-instantclient-basic-21.12.0.0.0-1.el8.x86_64.rpm | |
sudo alien -i oracle-instantclient-devel-21.12.0.0.0-1.el8.x86_64.rpm | |
sudo alien -i oracle-instantclient-odbc-21.12.0.0.0-1.el8.x86_64.rpm | |
sudo alien -i oracle-instantclient-sqlplus-21.12.0.0.0-1.el8.x86_64.rpm | |
echo "export ORACLE_HOME=/usr/lib/oracle/21/client64" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export TNS_ADMIN=/usr/lib/oracle/21/client64/lib/network/admin" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export LD_LIBRARY_PATH=/usr/lib/oracle/21/client64/lib:${LD_LIBRARY_PATH}" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export OCI_LIB=/usr/lib/oracle/21/client64/lib" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export OCI_INC=/usr/include/oracle/21/client64}" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export PHP_DTRACE=yes" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export EXTENSION_DIR=/usr/lib64/php/modules" | sudo tee -a /etc/profile.d/oracle.sh | |
echo "export PATH=\$ORACLE_HOME/bin:\$PATH" | sudo tee -a /etc/profile.d/oracle.sh sudo chmod +x /etc/profile.d/oracle.sh | |
source /etc/profile.d/oracle.sh | |
shell: bash | |
- name: Install R packages | |
run: | | |
install.packages("remotes") | |
install.packages("DBI") | |
install.packages("ROracle", type = "source", configure.args = "--with-oci-lib=/usr/lib/oracle/21/client64/lib --with-oci-inc=/usr/include/oracle/21/client64") | |
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | |
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | |
shell: Rscript {0} | |
- name: Install binary dependencies | |
#if: runner.os != 'Linux' | |
run: | | |
remotes::install_deps(dependencies = TRUE, type="binary") | |
shell: Rscript {0} | |
- name: Install pkgdown | |
run: | | |
install.packages("pkgdown", type = "binary") | |
shell: Rscript {0} | |
- name: Install package | |
run: R CMD INSTALL . | |
- name: Build site | |
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) | |
shell: Rscript {0} | |
- name: Deploy to GitHub pages 🚀 | |
if: github.event_name != 'pull_request' | |
uses: JamesIves/[email protected] | |
with: | |
clean: false | |
branch: gh-pages | |
folder: docs |