-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move CI to github actions #433
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
4646973
Add github actions builds
r-ash 6e1ff6f
Setup tmate session
r-ash aaf166e
Increase timeout on actions
r-ash 44b7f5d
Use new version of duckdb
r-ash 82c4ccf
More fixes for github actions
r-ash 6b98134
Fix vignette rot
r-ash fde87ee
Fix remaining vignette issues, and more CMD check issues
r-ash fa0b475
Don't error on R CMD warnings
r-ash 7e1ccea
Bump version number
r-ash d2572fa
Specify minimum Matrix version number
r-ash e5afd7b
Improve test to try understand failure on windows
r-ash 05c5814
Fix test on windows
r-ash adcbace
Move docker container build onto GH actions
r-ash c3c2cd4
Set path to Dockerfile in context
r-ash 6e2e351
Use file instead of context
r-ash fc99545
Set dockerhub username and token
r-ash 7055bd0
Update build badge, unpin naomi branch
r-ash 072185d
Remove first90 branch pin
r-ash e4f1e0e
Use naomi.options from r-universe
r-ash 831699d
Fix print signature and export it properly
r-ash d98c597
Update .Rbuildignore
r-ash File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ | |
^docker$ | ||
^buildkite$ | ||
^images$ | ||
^\.github$ | ||
^figure$ | ||
^cache$ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: R-CMD-check | ||
|
||
jobs: | ||
R-CMD-check: | ||
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'} | ||
|
||
# Shorter timeout to prevent mac builders hanging for 6 hours! | ||
timeout-minutes: 90 | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Install libssh | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libssh-dev | ||
|
||
- 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 | ||
extra-repositories: https://mrc-ide.r-universe.dev | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rcmdcheck | ||
needs: check | ||
|
||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
upload-snapshots: true | ||
error-on: '"error"' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Build Docker Image | ||
|
||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- id: extract_branch | ||
name: Extract branch name | ||
shell: bash | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Login to GHCR (GitHub Packages) | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push dev containers | ||
uses: docker/build-push-action@v5 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
file: "./docker/Dockerfile" | ||
push: true | ||
tags: | | ||
mrcide/naomi:${{steps.extract_branch.outputs.branch}} | ||
ghcr.io/${{github.repository}}:${{steps.extract_branch.outputs.branch}} | ||
|
||
- name: Build and push prod containers | ||
uses: docker/build-push-action@v5 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
file: "./docker/Dockerfile" | ||
push: true | ||
tags: | | ||
mrcide/naomi:latest | ||
mrcide/naomi:${{steps.extract_branch.outputs.branch}} | ||
ghcr.io/${{github.repository}}:latest | ||
ghcr.io/${{github.repository}}:${{steps.extract_branch.outputs.branch}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
name: pkgdown | ||
|
||
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 }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Install libssh | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libssh-dev | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
extra-repositories: https://mrc-ide.r-universe.dev/bin/linux/jammy/4.3 | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::pkgdown, local::. | ||
needs: website | ||
|
||
- 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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: test-coverage | ||
|
||
jobs: | ||
test-coverage: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install libssh | ||
if: runner.os == 'Linux' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libssh-dev | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
extra-repositories: https://mrc-ide.r-universe.dev | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::covr | ||
needs: coverage | ||
|
||
- name: Test coverage | ||
run: | | ||
covr::codecov( | ||
quiet = FALSE, | ||
clean = FALSE, | ||
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") | ||
) | ||
shell: Rscript {0} | ||
|
||
- name: Show testthat output | ||
if: always() | ||
run: | | ||
## -------------------------------------------------------------------- | ||
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true | ||
shell: bash | ||
|
||
- name: Upload test results | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-test-failures | ||
path: ${{ runner.temp }}/package |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Package: naomi | ||
Title: Naomi Model for Subnational HIV Estimates | ||
Version: 2.9.23 | ||
Version: 2.9.24 | ||
Authors@R: | ||
person(given = "Jeff", | ||
family = "Eaton", | ||
|
@@ -13,35 +13,36 @@ License: MIT + file LICENSE | |
Encoding: UTF-8 | ||
LazyData: true | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.3 | ||
RoxygenNote: 7.3.1 | ||
Additional_repositories: | ||
https://mrc-ide.r-universe.dev | ||
https://mrc-ide.r-universe.dev, | ||
https://duckdb.r-universe.dev | ||
Imports: | ||
DBI, | ||
Matrix, | ||
Matrix (>= 1.6.5), | ||
R6, | ||
TMB, | ||
assertthat, | ||
brio, | ||
data.tree, | ||
dplyr (>= 1.1.0), | ||
duckdb (== 0.9.1), | ||
duckdb (>= 0.10.0), | ||
eppasm (>= 0.7.1), | ||
gt, | ||
first90 (>= 1.6.1), | ||
forcats, | ||
fs, | ||
ggplot2, | ||
gt, | ||
here, | ||
knitr, | ||
magrittr, | ||
methods, | ||
mvtnorm, | ||
naomi.options (>= 1.2.0), | ||
openxlsx, | ||
plotly, | ||
prettyunits, | ||
qs, | ||
readr (>= 2.0.1), | ||
rlang, | ||
rmarkdown, | ||
sf, | ||
spdep (>= 1.1), | ||
|
@@ -59,27 +60,23 @@ Suggests: | |
DiagrammeR, | ||
covr, | ||
datamodelr, | ||
here, | ||
knitr, | ||
lubridate, | ||
mockery, | ||
mockr, | ||
readxl, | ||
rvest, | ||
scales, | ||
testthat (>= 2.1.0), | ||
tibble, | ||
tidyverse, | ||
viridis | ||
VignetteBuilder: knitr | ||
LinkingTo: | ||
RcppEigen, | ||
TMB | ||
Remotes: | ||
bergant/datamodelr, | ||
mrc-ide/eppasm, | ||
first90=mrc-ide/first90release, | ||
reside-ic/traduire, | ||
mrc-ide/naomi.options, | ||
mrc-ide/mockr, | ||
mrc-ide/testthat.buildkite, | ||
duckdb/[email protected] | ||
bergant/datamodelr | ||
Config/testthat/edition: 3 | ||
Config/testthat/parallel: true |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to avoid going via docker hub soon and only go via ghcr? You'll need to arrange a new dockerhub account otherwise, and they will definitely consider Avenir commercial
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, expecting we can remove this soon. I'll get deployment working off ghcr and then can remove this