-
Notifications
You must be signed in to change notification settings - Fork 6
98 lines (83 loc) · 2.73 KB
/
test.yml
File metadata and controls
98 lines (83 loc) · 2.73 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
name: Test Morloc
on: [push]
jobs:
linux-test:
runs-on: ubuntu-latest
timeout-minutes: 60
env:
DEBIAN_FRONTEND: noninteractive
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Haskell (GHC + Stack)
uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.7'
enable-stack: true
stack-version: 'latest'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Stack dependencies
uses: actions/cache@v4
with:
path: |
~/.stack/snapshots
~/.stack/setup-exe-cache
.stack-work
key: stack-deps-${{ hashFiles('stack.yaml.lock', 'package.yaml') }}
restore-keys: |
stack-deps-
- name: Cache Cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
data/rust/target
key: cargo-deps-${{ hashFiles('data/rust/Cargo.lock') }}
restore-keys: |
cargo-deps-
- name: Increase shared memory (needed for morloc SHM pool tests)
run: sudo mount -o remount,size=4G /dev/shm
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
r-base-core \
python3 \
python3-dev \
python3-pip \
python3-numpy \
g++ \
gcc \
make \
libgsl-dev
python3 -m pip install --break-system-packages --upgrade setuptools pyarrow
- name: Cache R packages
uses: actions/cache@v4
id: r-cache
with:
path: ~/R/library
key: r-lib-${{ runner.os }}-${{ runner.arch }}
- name: Install R packages
if: steps.r-cache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/R/library
LIBARROW_MINIMAL=true ARROW_S3=OFF ARROW_GCS=OFF \
Rscript -e 'install.packages("arrow", lib="~/R/library", repos = "https://cloud.r-project.org")'
- name: Add morloc bin folders to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.local/share/morloc/bin" >> $GITHUB_PATH
echo "R_LIBS_USER=$HOME/R/library" >> $GITHUB_ENV
- name: Build Morloc
run: |
stack install --system-ghc --no-install-ghc --no-run-tests
- name: Initialize morloc and install modules
run: |
MORLOC_RUST_DIR=$(pwd)/data/rust morloc init -f
morloc install stdlib
- name: Test morloc
run: |
stack test --system-ghc --no-install-ghc morloc:morloc-test
timeout-minutes: 10