-
Notifications
You must be signed in to change notification settings - Fork 14
86 lines (69 loc) · 2.51 KB
/
test.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Test enclone
on:
pull_request:
push:
branches:
- master
env:
RUST_VERSION: "1.71.0"
CARGO_INCREMENTAL: 0
jobs:
test-mac:
# This job runs on MacOS Catalina
runs-on: macos-latest
steps:
# check out master
- name: Checkout enclone master
uses: actions/checkout@master
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.style }}v1 # increment this to bust the cache if needed
# set up caching (duplicated verbatim below)
#
# We have observed that Mac builds on GitHub Actions sometimes fail with errors about
# crates, including prost. These errors are observed to come and go as unrelated commits
# are made. We believe these errors are associated with caching.
#
# 1. We added a purge step, which worked for a while, then exhibited the same error
# phenotype. Now turned off.
#
# 2. We turned off the caching. This seems to have solved the problem.
#
# THIS IS A NEW VERSION. MAYBE IT WILL WORK.
- uses: Swatinem/rust-cache@v2
# start the real work
- name: Remove the Cargo target directory
if: github.ref == 'refs/heads/master'
run: cargo clean
- name: build-enclone
run: cargo build
- name: download test data
run: git clone --depth=1 https://github.com/10XGenomics/enclone-data.git
- name: unit tests
run: cd enclone_exec; cargo test --features basic -- --nocapture
test-linux:
# This job runs on Linux
runs-on: ubuntu-latest
steps:
# check out master
- name: Checkout enclone master
uses: actions/checkout@master
with:
fetch-depth: 100
# set up caching (duplicated verbatim below)
- uses: Swatinem/rust-cache@v2
# start the real work
- name: Check for large files
run: >
git rev-list --objects ${{github.event.pull_request.base.sha}}..
| git cat-file --batch-check='%(objectname) %(objecttype) %(objectsize) %(rest)'
| awk '$2 == "blob" && $3 >= 4194304 { print substr($1, 1, 7), $3, $4; fail=1 } END { exit fail }'
- name: Remove the Cargo target directory
if: github.ref == 'refs/heads/master'
run: cargo clean
- name: build-enclone
run: cargo build
- name: download test data
run: git clone --depth=1 https://github.com/10XGenomics/enclone-data.git
- name: unit tests
run: cd enclone_exec; cargo test --features basic -- --nocapture