-
Notifications
You must be signed in to change notification settings - Fork 25
92 lines (79 loc) · 2.24 KB
/
test-linux.yml
File metadata and controls
92 lines (79 loc) · 2.24 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
name: "Test Ark - Linux"
on:
workflow_call:
workflow_dispatch:
inputs:
ssh:
description: 'Set up an SSH session before running `cargo nextest run`?'
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' }
# Track upstream breaking changes
- { rust: 'stable', r: 'devel' }
timeout-minutes: 40
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 nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- 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:
dependencies: '"hard"'
packages:
data.table
dplyr
haven
R6
ragg
rstudioapi
survival
tibble
- 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 Tests
env:
NEXTEST_PROFILE: "ci"
run: |
cargo nextest run