Skip to content

Commit

Permalink
Updated GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
leifeld committed Aug 19, 2024
1 parent 41cb845 commit f1764f2
Showing 1 changed file with 30 additions and 19 deletions.
49 changes: 30 additions & 19 deletions .github/workflows/build-and-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,8 @@ name: build
on: [push, pull_request, workflow_dispatch]

jobs:
install-dependencies:
runs-on: ${{ matrix.config.os }}
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
install-system-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

Expand All @@ -38,6 +25,23 @@ jobs:
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
install-r-dependencies:
runs-on: ${{ matrix.config.os }}
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: actions/cache@v3
id: r-packages-cache
with:
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
any::pbmcapply
Bibliography:
needs: install-dependencies
needs: install-system-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -127,7 +131,7 @@ jobs:
path: build/*.jar

rDNA:
needs: [DNA, install-dependencies]
needs: [DNA, install-system-dependencies, install-r-dependencies]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -159,7 +163,7 @@ jobs:

rDNA-check:
runs-on: ${{ matrix.config.os }}
needs: rDNA
needs: [install-system-dependencies, install-r-dependencies]
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
Expand Down Expand Up @@ -194,6 +198,11 @@ jobs:
with:
path: ~/.cache/R
key: ${{ runner.os }}-r-${{ hashFiles('**/DESCRIPTION') }}-v1
- uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/[email protected]
- name: Execute Gradle build for rDNA
run: ./gradlew :rDNA:build
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
Expand All @@ -206,7 +215,7 @@ jobs:

rDNA-test:
runs-on: ubuntu-latest
needs: [rDNA, install-dependencies]
needs: [install-system-dependencies, install-r-dependencies]
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
Expand All @@ -227,6 +236,8 @@ jobs:
- uses: gradle/wrapper-validation-action@v1
- name: Setup Gradle
uses: gradle/[email protected]
- name: Execute Gradle build for rDNA
run: ./gradlew :rDNA:build
- name: Execute Gradle rDNATest Task
run: ./gradlew :rDNA:rDNATest
- name: Store test results
Expand Down

0 comments on commit f1764f2

Please sign in to comment.