-
Notifications
You must be signed in to change notification settings - Fork 36
140 lines (136 loc) · 4.47 KB
/
Copy pathrelease.yml
File metadata and controls
140 lines (136 loc) · 4.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Release Testing (Devel)
on:
push:
branches:
- 'release/**'
pull_request:
branches:
- 'release/**'
workflow_dispatch:
# automatically cancel in-progress builds if another commit is pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# default to 0 permissions
# (job-level overrides add the minimal permissions needed)
permissions:
contents: none
jobs:
version_check:
name: Confirm Whole Version Number
runs-on: ubuntu-latest
permission:
contents: read
steps:
- name: checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
persist-credentials: false
- name: Display Version Found
shell: bash
run: grep -E "Version:" $GITHUB_WORKSPACE/DESCRIPTION
- name: Test if it is a production pattern (#.#.#)
shell: bash
run: |
verLine=$(grep -E "Version:" $GITHUB_WORKSPACE/DESCRIPTION)
dots="${verLine//[^.]}"
cnt=${#dots}
echo $((2-$cnt))
devel_test:
name: ${{ matrix.os }} (R ${{ matrix.r-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
r-version: 'devel'
- os: macos-latest
r-version: 'devel'
- os: windows-latest
r-version: 'devel'
permissions:
contents: read
steps:
- name: checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
persist-credentials: false
- name: If local, apt update
if: ${{ (env.ACT || false) && (matrix.os == 'ubuntu-latest')}}
run: sudo apt update
- name: Install Tidy Ubuntu
if: matrix.os == 'ubuntu-latest'
run: sudo apt install -y tidy
- name: set up R
uses: r-lib/actions/setup-r@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
with:
r-version: ${{ matrix.r-version }}
- uses: r-lib/actions/setup-pandoc@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
- uses: r-lib/actions/setup-tinytex@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
- run: tlmgr --version
- name: Install additional LaTeX Packages
run: |
tlmgr update --self
tlmgr update --all
tlmgr install titling framed inconsolata
tlmgr install collection-fontsrecommended
- uses: r-lib/actions/setup-r-dependencies@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
with:
extra-packages: any::rcmdcheck
needs: check
- uses: r-lib/actions/check-r-package@6f6e5bc62fba3a704f74e7ad7ef7676c5c6a2590 # v2.11.4
with:
args: 'c("--as-cran")'
error-on: '"warning"'
check-dir: '"check"'
upload-results: '"true"'
upload-snapshots: '"true"'
all-successful:
if: always()
runs-on: ubuntu-latest
needs:
- devel_test
- version_check
permissions:
statuses: read
steps:
- name: Note that all tests succeeded
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
jobs: ${{ toJSON(needs) }}
build-tarball:
runs-on: ubuntu-latest
needs: [version_check]
permissions:
contents: read
steps:
- name: checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
persist-credentials: false
- name: If local, apt update
if: ${{ (env.ACT || false)}}
run: sudo apt update
- name: Install Tidy Ubuntu
run: sudo apt install -y tidy
- name: build tarball for submission to CRAN
run: R CMD build $GITHUB_WORKSPACE
- name: Grab tarball path
shell: bash
run: |
TAR_NAME="pkgnet_"
TAR_NAME+="$(grep -E "Version:" $GITHUB_WORKSPACE/DESCRIPTION | cut -f2- -d: | awk '{$1=$1};1')"
TAR_NAME+=".tar.gz"
echo "TAR_NAME=$TAR_NAME" >> $GITHUB_ENV
- name: Upload tarball to run
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{env.TAR_NAME}}
path: ${{github.workspace}}/${{env.TAR_NAME}}
if-no-files-found: error
compression-level: 0 # already compressed