Updated gradle, yml, rDNA tests+check #1
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: build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
install-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Restore System Dependencies Cache | |
uses: actions/cache@v3 | |
id: system-deps-cache | |
with: | |
path: | | |
/usr/local/texlive | |
/usr/local/bin/pandoc | |
/usr/local/texlive/texmf-var | |
/usr/local/texlive/tlpkg/texlive.tlpdb | |
key: ${{ runner.os }}-system-deps-v1 | |
- name: Install System Dependencies | |
if: steps.system-deps-cache.outputs.cache-hit != 'true' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texlive-bibtex-extra pandoc pandoc-citeproc | |
- uses: actions/cache@v3 | |
id: r-packages-cache | |
with: | |
path: | | |
~/.cache/R | |
/usr/local/texlive | |
/usr/local/bin/pandoc | |
/usr/local/texlive/texmf-var | |
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}-v1 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 2 | |
working-directory: rDNA/rDNA | |
extra-packages: | | |
any::devtools | |
any::testthat | |
any::ggplot2 | |
any::roxygen2 | |
any::igraph | |
any::ggraph | |
any::askpass | |
any::cluster | |
any::sna | |
any::ggrepel | |
any::coda | |
any::MCMCpack | |
any::tidygraph | |
any::heatmaply | |
any::factoextra | |
any::MASS | |
any::pbmcapply | |
Bibliography: | |
needs: install-dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build for bibliography | |
run: ./gradlew :bibliography:build | |
- name: Store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Bibliography | |
path: build/bibliography.* | |
DNA: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: gradle/wrapper-validation-action@v1 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build for DNA | |
run: ./gradlew :dna:build | |
- name: Store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: DNA | |
path: build/*.jar | |
rDNA: | |
needs: [DNA, install-dependencies] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build for rDNA | |
run: ./gradlew :rDNA:build | |
- name: Store artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rDNA | |
path: build/*.tar.gz | |
rDNA-check: | |
runs-on: ${{ matrix.config.os }} | |
needs: rDNA | |
name: ${{ matrix.config.os }} (${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: macOS-latest, r: 'release'} | |
- {os: windows-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} | |
- {os: ubuntu-latest, r: 'release'} | |
- {os: ubuntu-latest, r: 'oldrel-1'} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: any::rcmdcheck | |
needs: check | |
working-directory: rDNA/rDNA | |
- uses: r-lib/actions/check-r-package@v2 | |
with: | |
working-directory: rDNA/rDNA | |
upload-snapshots: true | |
rDNA-test: | |
runs-on: ubuntu-latest | |
needs: [rDNA, install-dependencies] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle rDNATest Task | |
run: ./gradlew :rDNA:rDNATest | |
- name: Store test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rDNA-Test-Results | |
path: build/reports/tests |