Skip to content

Commit 56bc6a8

Browse files
author
mikejiang
committed
update yaml
1 parent 4c4186d commit 56bc6a8

File tree

1 file changed

+26
-125
lines changed

1 file changed

+26
-125
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,45 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
#
6-
7-
name: build
8-
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
93
on:
104
push:
11-
branches: [ release, master ]
5+
branches: [main, master]
126
pull_request:
13-
branches: [ release, master ]
14-
workflow_dispatch:
7+
branches: [main, master]
8+
9+
name: R-CMD-check
1510

1611
jobs:
17-
build:
12+
R-CMD-check:
1813
runs-on: ${{ matrix.config.os }}
19-
name: ${{ matrix.config.os }} (${{ matrix.r }})
14+
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16+
2017
strategy:
2118
fail-fast: false
2219
matrix:
23-
r: ['release', 'devel']
2420
config:
25-
# - {os: windows-latest, suffix: 'zip'}
26-
- {os: macOS-latest, suffix: 'tgz'}
27-
# - {os: ubuntu-16.04, suffix: 'tar.gz', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28-
isMaster:
29-
- ${{ contains(github.ref, 'master') }}
30-
exclude:
31-
- isMaster: false
32-
r: devel
33-
- isMaster: true
34-
r: release
21+
- {os: macOS-latest, r: 'release'}
22+
3523
env:
36-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
37-
RSPM: ${{ matrix.config.rspm }}
38-
24+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
25+
R_KEEP_PKG_SOURCE: yes
26+
3927
steps:
4028
- uses: actions/checkout@v2
41-
- name: Set up R ${{ matrix.r }}
42-
uses: r-lib/actions/setup-r@master
43-
with:
44-
r-version: ${{ matrix.r }}
45-
http-user-agent: ${{ matrix.config.http-user-agent }}
4629

47-
- uses: r-lib/actions/setup-pandoc@v1
48-
49-
- uses: r-lib/actions/setup-tinytex@v1
50-
- run: tlmgr --version
51-
52-
- name: add more tex pkgs
53-
run: |
54-
install.packages('tinytex')
55-
tinytex:::install_yihui_pkgs()
56-
shell: Rscript {0}
57-
58-
# - name: set token for cytoinstaller(and remotes) to increase github API rate limit
59-
# env:
60-
# SUPER_SECRET: ${{ secrets.CYTOINSTALLER_TOKEN }}
61-
# run: echo "GITHUB_TOKEN=$SUPER_SECRET" >> $GITHUB_ENV
62-
63-
- name: Query dependencies
64-
run: |
65-
install.packages('remotes')
66-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
67-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
68-
shell: Rscript {0}
69-
70-
- name: Install macOS system dependencies
71-
if: runner.os == 'macOS'
72-
run: brew install libgit2
30+
- uses: r-lib/actions/setup-pandoc@v2
7331

74-
- name: Get bioc ver
75-
run: echo "bioc_ver=$(Rscript -e 'writeLines(as.character(remotes::bioc_version()))')" >> $GITHUB_ENV
76-
shell: bash
77-
78-
- name: Cache R packages
79-
if: runner.os != 'Windows'
80-
uses: actions/cache@v2
32+
- uses: r-lib/actions/setup-r@v2
8133
with:
82-
path: ${{ env.R_LIBS_USER }}
83-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
84-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
85-
86-
- name: check bioc ver
87-
run: echo $bioc_ver
88-
shell: bash
89-
90-
- name: Install system dependencies
91-
if: runner.os == 'Linux'
92-
run: |
93-
while read -r cmd
94-
do
95-
eval sudo $cmd
96-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
97-
sudo apt-get install -y libcurl4-openssl-dev
98-
99-
- name: Install dependencies
100-
run: |
101-
remotes::install_cran(c("rcmdcheck", "devtools"))
102-
remotes::install_deps(dependencies = TRUE)
103-
remotes::install_bioc("flowStats")
104-
#remotes::install_github("RGLab/cytoinstaller")
105-
#cytoinstaller::cyto_install_deps(dependencies = TRUE)
106-
shell: Rscript {0}
34+
r-version: ${{ matrix.config.r }}
35+
http-user-agent: ${{ matrix.config.http-user-agent }}
36+
use-public-rspm: true
10737

108-
# - name: check rate limit
109-
# run: |
110-
# gh::gh("GET /rate_limit")$resources$core$remaining
111-
# shell: Rscript {0}
112-
113-
- name: Check
114-
env:
115-
_R_CHECK_CRAN_INCOMING_REMOTE_: false
116-
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), check_dir = "check")
117-
shell: Rscript {0}
38+
- uses: r-lib/actions/setup-r-dependencies@v2
39+
with:
40+
extra-packages: any::rcmdcheck
41+
needs: check
11842

119-
- name: Upload check results
120-
if: failure()
121-
uses: actions/upload-artifact@main
43+
- uses: r-lib/actions/check-r-package@v2
12244
with:
123-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
124-
path: check
125-
126-
# - name: build src pkg
127-
# if: runner.os == 'Linux'
128-
# run: devtools::build()
129-
# shell: Rscript {0}
130-
131-
# - name: build bin pkg
132-
# if: runner.os != 'Linux'
133-
# run: devtools::build(binary = TRUE)
134-
# shell: Rscript {0}
135-
136-
# - name: Upload Release Asset
137-
# uses: svenstaro/upload-release-action@v2
138-
# with:
139-
# repo_token: ${{ secrets.GITHUB_TOKEN }}
140-
# file: '../*.${{ matrix.config.suffix }}'
141-
# file_glob: true
142-
# tag: bioc_${{ env.bioc_ver}}
143-
# overwrite: true
144-
# body: "This is my release text"
45+
upload-snapshots: true

0 commit comments

Comments
 (0)