-
Notifications
You must be signed in to change notification settings - Fork 15
78 lines (66 loc) · 1.92 KB
/
test-linux.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
name: "Test Ark - Linux"
on:
workflow_call:
workflow_dispatch:
inputs:
ssh:
description: 'Set up an SSH session before running `cargo test`?'
type: boolean
required: true
default: false
jobs:
linux:
runs-on: ubuntu-latest
name: "Rust: ${{ matrix.config.rust }}, R: ${{ matrix.config.r }}"
strategy:
fail-fast: false
matrix:
config:
- { rust: 'stable', r: 'release' }
# Oldest supported R version
- { rust: 'stable', r: '4.2' }
# Nightly rust
- { rust: 'nightly', r: 'release' }
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Update Build Environment
run: |
sudo apt-get update
- name: Install Nightly Rust
uses: dtolnay/rust-toolchain@nightly
if: matrix.config.rust == 'nightly'
- name: Report Rust Toolchain
run: rustup show
- name: Rust Cache
uses: Swatinem/rust-cache@v2
# Cache isn't useful on nightly, it would be thrown away every day
if: matrix.config.rust != 'nightly'
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- name: Install R Packages Required For Tests
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
data.table
rstudioapi
tibble
haven
- name: Set LD_LIBRARY_PATH
run: |
echo "LD_LIBRARY_PATH=$(R RHOME)/lib" >> $GITHUB_ENV
- name: Setup SSH access
uses: mxschmitt/action-tmate@v3
if: ${{ inputs.ssh }}
timeout-minutes: 30
- name: Build
run: |
cargo build
- name: Run Unit Tests
run: |
cargo test --verbose -- --nocapture