-
Notifications
You must be signed in to change notification settings - Fork 45
71 lines (58 loc) · 1.89 KB
/
build.yaml
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
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
update:
description: 'Update the R package library'
name: Build and update package library
jobs:
Build:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04', 'ubuntu-24.04']
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}
steps:
- name: Prepare system
run: |
sudo apt-get update
sudo add-apt-repository -y "ppa:marutter/rrutter4.0"
sudo apt-get install -y git curl devscripts equivs gdebi-core
- name: Checkout
uses: actions/checkout@v4
- name: Update package library
if: ${{ github.event.inputs.update }}
run: |
(cd opencpu-lib; rm *.tar.gz; Rscript downloaddeps.R)
git add opencpu-lib
git status
- name: Install build dependencies
run: |
sudo mk-build-deps -i
- name: Build
run: |
echo "DEBUILD_TGZ_CHECK=no" >> ~/.devscripts
debuild -us -uc
- name: Test installing
run: |
sudo gdebi --n ../opencpu-lib_*.deb
sudo gdebi --n ../opencpu-server_*.deb
- name: Test server is up
run: curl -m5 --fail http://localhost/ocpu/info
- name: Test output formats
run: |
curl -m5 --fail http://localhost/ocpu/library/MASS/data/cats/ndjson
curl -m5 --fail http://localhost/ocpu/library/MASS/data/cats/arrowipc
- name: Print server logs
run: sudo cat /var/log/apache2/error.log
- name: Commit R package library updates
if: ${{ github.event.inputs.update && contains(matrix.os, 'ubuntu-22.04') }}
run: |
git config --global user.name 'Jeroen Ooms'
git config --global user.email '[email protected]'
git commit -m "Auto update package library"
git push