-
Notifications
You must be signed in to change notification settings - Fork 69
83 lines (80 loc) · 2.86 KB
/
push.yml
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
name: Push to master
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@master
- name: Setup R - Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update -qq
sudo apt install --no-install-recommends software-properties-common dirmngr
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
sudo apt install --no-install-recommends r-base
- uses: r-lib/actions/setup-r@v1
name: Setup R - Windows / macOS
if: matrix.os != 'ubuntu-latest'
with:
r-version: '4.0.2'
- name: Set R environment variables
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
mkdir -p ~/.local/lib/R
echo "R_LIBS_USER=~/.local/lib/R" >> "$GITHUB_ENV"
echo "R_HOME=$(R RHOME)" >> "$GITHUB_ENV"
elif [ "$RUNNER_OS" == "macOS" ]; then
echo "R_HOME=$(R RHOME)" >> "$GITHUB_ENV"
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "R_HOME=$(R RHOME)" >> "$GITHUB_ENV"
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Verify R Home
run: |
Rscript -e 'R.home()'
echo "${{ env.R_HOME }}"
- name: Install R package dependencies
run: Rscript -e "install.packages(c('tseries', 'zoo'), repos = 'http://cran.us.r-project.org')"
shell: bash
- name: Setup .NET 5
uses: actions/setup-dotnet@v1
with:
dotnet-version: '5.0.x'
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
include-prerelease: true
- name: Test F# scripts
run: dotnet fsi citest.fsx
- name: Restore tool dependencies
run: dotnet tool restore
- name: Restore paket dependencies
run: dotnet paket restore
- name: Restore dependencies
run: dotnet restore RProvider.sln
- name: Restore dependencies (tests)
run: dotnet restore RProvider.Tests.sln
- name: Build
run: dotnet fake build -t All
- name: Deploy documentation from master
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output
publish_branch: gh-pages
force_orphan: true
- name: Publish NuGets (if this version not published before)
if: matrix.os == 'macos-latest'
run: dotnet nuget push bin/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGETKEY }} --skip-duplicate