-
Notifications
You must be signed in to change notification settings - Fork 5
93 lines (84 loc) · 2.45 KB
/
rust.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: cargo
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
pre_job:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
# All of these options are optional, so you can remove them if you are happy with the defaults
concurrent_skipping: 'same_content_newer'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md"]'
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
name: Build on Ubuntu
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare environment
run: |
sudo apt-get update
sudo apt-get install clang
sudo apt-get install libclang1
sudo apt-get install libeccodes-dev
rustup update stable
cargo install cargo-criterion
cargo clean
- name: Build with cargo
run: |
cargo build --release --features "experimental_index, message_ndarray"
cargo clean
- name: Test with cargo
run: |
cargo test --no-default-features
cargo test --features "message_ndarray"
cargo test --features "experimental_index"
cargo test --features "experimental_index, message_ndarray"
cargo clean
- name: Benchmark with criterion
run: |
cargo criterion
cargo clean
build-macos:
name: Build on MacOS
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Prepare environment
run: |
brew install eccodes
rustup update stable
cargo install cargo-criterion
cargo clean
- name: Build with cargo
run: |
cargo build --release --features "experimental_index, message_ndarray"
cargo clean
- name: Test with cargo
run: |
cargo test --no-default-features
cargo test --features "message_ndarray"
cargo test --features "experimental_index"
cargo test --features "experimental_index, message_ndarray"
cargo clean
- name: Benchmark with criterion
run: |
cargo criterion
cargo clean