Update OmicSelector_create_formula.R #408
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
on: | |
push: | |
branches: master | |
name: R package (Linux) | |
jobs: | |
Rpackage: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: OmicSelector | |
miniconda-version: "latest" | |
- name: Install enviorment | |
shell: bash -l {0} | |
run: | | |
conda install -c conda-forge conda-pack | |
sudo apt-get update --fix-missing | |
sudo chsh -s /bin/bash root && sudo echo 'SHELL=/bin/bash' >> /etc/environment && sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && sudo echo $TZ > /etc/timezone && sudo apt update && sudo apt dist-upgrade -y && sudo apt-get install -y pciutils libkmod-dev libgsl-dev libv8-dev mc libglu1-mesa-dev libgit2-dev gdebi uuid apt-transport-https screen libfontconfig1-dev build-essential libxml2-dev xorg ca-certificates cmake curl git libatlas-base-dev libcurl4-openssl-dev libjemalloc-dev liblapack-dev libopenblas-dev libopencv-dev libzmq3-dev software-properties-common sudo unzip wget && sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y build-essential libmagick++-dev libbz2-dev libpcre2-16-0 libpcre2-32-0 libpcre2-8-0 libpcre2-dev fort77 xorg-dev liblzma-dev libblas-dev gfortran gcc-multilib gobjc++ libreadline-dev && sudo apt install -y pandoc texinfo texlive-fonts-extra texlive libcairo2-dev freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglfw3-dev libgles2-mesa-dev libopenblas-dev liblapack-dev libopencv-dev build-essential git gcc cmake libcairo2-dev libxml2-dev texlive-full texlive-xetex ttf-mscorefonts-installer build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev default-jre default-jdk && echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | debconf-set-selections | |
sudo apt-get install -y apt-utils libxml2-dev sshfs cifs-utils libffi-dev libx11-dev mesa-common-dev libharfbuzz-dev libfribidi-dev libfreetype6-dev libglu1-mesa-dev libssl-dev wget bzip2 ca-certificates build-essential cmake git unzip pkg-config libopenblas-dev liblapack-dev libhdf5-serial-dev libglib2.0-0 libxext6 libsm6 libxrender1 gfortran gcc libglu1-mesa-dev freeglut3-dev mesa-common-dev && sudo apt-get clean | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && sudo add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -sc)-cran40/" && sudo apt update && sudo apt -y dist-upgrade && sudo apt install -y r-base-dev texlive-full texlive-xetex ttf-mscorefonts-installer r-recommended build-essential libcurl4-gnutls-dev libxml2-dev libssl-dev default-jre default-jdk && sudo chmod 777 -R '/usr/local/lib/R/site-library' && Rscript -e "install.packages(c('remotes','devtools','BiocManager','keras','rgl','rJava'))" | |
conda create -c anaconda -c conda-forge -n tensorflow tensorflow-gpu keras numpy pandas xgboost scikit-learn tqdm pickle5 | |
echo 'options(repos = c(CRAN = "https://packagemanager.rstudio.com/cran/latest"));' >> ~/.Rprofile | |
sudo Rscript -e 'update.packages(ask = F); install.packages(c("devtools","remotes"));' | |
sudo Rscript -e 'remotes::install_version("RSQLite", version = "2.2.5")' # Temporary fix for RSQLite https://stackoverflow.com/questions/67279457/error-with-r-package-biomart-and-this-dependency-rsqlite | |
sudo Rscript -e 'devtools::source_url("https://raw.githubusercontent.com/kstawiski/OmicSelector/master/vignettes/setup.R")' | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TZ: Europe/Warsaw | |
LANG: C.UTF-8 | |
LC_ALL: C.UTF-8 | |
- name: Install package | |
shell: bash -l {0} | |
run: | | |
sudo chmod 777 -R /usr/local/lib/R/site-library/ | |
sudo R CMD INSTALL . | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check loading | |
shell: bash -l {0} | |
run: | | |
Rscript -e 'library(OmicSelector); sessionInfo();' | |
- name: Pack env | |
shell: bash -l {0} | |
run: | | |
conda pack -n OmicSelector -o OmicSelector_conda_pack.tar.gz | |
mkdir release | |
mv OmicSelector_conda_pack.tar.gz release/ | |
split -b 1500M release/OmicSelector_conda_pack.tar.gz "release/OmicSelector_conda_pack.tar.gz.part" | |
# Removes the latest release, so that we can create a new one in its place | |
- name: Delete latest release | |
uses: ame-yu/action-delete-latest-release@v2 | |
continue-on-error: true # in case there's no existing release | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# (optional) Removes the tag associated with the latest release | |
- name: Delete release tag | |
run: | | |
git tag -d release | |
git push origin :release | |
continue-on-error: true # in case there's no existing release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
release/OmicSelector_conda_pack.tar.gz.partaa | |
release/OmicSelector_conda_pack.tar.gz.partab | |
release/OmicSelector_conda_pack.tar.gz.partac | |
release/OmicSelector_conda_pack.tar.gz.partad | |
body: "OmicSelector - latest version packed as [conda-pack](https://conda.github.io/conda-pack/) and source code. Due to Github limits, the archive is splitted into multiple parts. Use: `cat OmicSelector_conda_pack.tar.gz.part* > OmicSelector_conda_pack.tar.gz` to merge it again." | |
name: Latest conda-pack (Linux) | |
tag_name: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: 📂 Upload to deploy.konsta.com.pl | |
uses: SamKirkland/[email protected] | |
with: | |
server: konsta.com.pl | |
username: deploy | |
password: ${{ secrets.PASSWORD }} | |
server-dir: ./Deploy/OmicSelector/ | |