1+ name : CI downsample_rs
2+
3+ on :
4+ pull_request :
5+ push :
6+ branches :
7+ - main
8+
9+ defaults :
10+ run :
11+ shell : bash
12+ working-directory : downsample_rs
13+
14+ jobs :
15+ Check :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout
19+ uses : actions/checkout@v2
20+
21+ - name : Install Rust toolchain
22+ uses : actions-rs/toolchain@v1
23+ with :
24+ profile : minimal
25+ toolchain : nightly
26+ components : clippy, rustfmt
27+ - name : Setup Rust
28+ run : |
29+ rustup update nightly --no-self-update
30+ rustup default nightly
31+
32+ - name : Rust toolchain info
33+ run : |
34+ cargo --version --verbose
35+ rustc --version
36+ cargo clippy --version
37+ cargo fmt --version
38+
39+ - name : check no optional features
40+ run : cargo check --verbose
41+ - name : check with all features
42+ run : cargo check --verbose --all-features
43+ - name : formatting check
44+ run : cargo fmt --all -- --check
45+ # TODO: enable clippy once I write docs for all public items
46+ # - name: check with clippy
47+ # run: cargo clippy --all --all-targets --all-features -- -D warnings
48+
49+ Test :
50+ runs-on : ${{ matrix.os }}
51+ strategy :
52+ fail-fast : false
53+ matrix :
54+ os : ['windows-latest', 'macOS-latest', 'ubuntu-latest']
55+ rust : ['nightly'] # ['stable', 'beta']
56+
57+ steps :
58+ - name : Checkout
59+ uses : actions/checkout@v2
60+
61+ - name : Install Rust toolchain
62+ uses : actions-rs/toolchain@v1
63+ with :
64+ profile : minimal
65+ toolchain : ${{ matrix.rust }}
66+ - name : Setup Rust
67+ run : |
68+ rustup update nightly --no-self-update
69+ rustup default nightly
70+
71+ - name : Cache Dependencies
72+ uses : Swatinem/rust-cache@v1
73+
74+ - name : Run tests (debug)
75+ run : cargo test --verbose --all-features
76+ - name : Run tests (release)
77+ run : cargo test --verbose --all-features --release
78+
79+ Bench :
80+ runs-on : ${{ matrix.os }}
81+ strategy :
82+ fail-fast : false
83+ matrix :
84+ os : ['ubuntu-latest'] # ['windows-latest', 'macOS-latest']
85+ rust : ['nightly'] # ['stable', 'beta']
86+
87+ steps :
88+ - name : Checkout
89+ uses : actions/checkout@v2
90+
91+ - name : Install Rust toolchain
92+ uses : actions-rs/toolchain@v1
93+ with :
94+ profile : minimal
95+ toolchain : ${{ matrix.rust }}
96+ - name : Setup Rust
97+ run : |
98+ rustup update nightly --no-self-update
99+ rustup default nightly
100+
101+ - name : Cache Dependencies
102+ uses : Swatinem/rust-cache@v1
103+
104+ - name : Run benchmarks
105+ run : cargo bench --quiet --message-format=short --all-features | grep "time:"
106+
107+ Build :
108+ runs-on : ubuntu-latest
109+ strategy :
110+ fail-fast : false
111+ matrix :
112+ target :
113+ # We shouldn't really have any OS-specific code, so think of this as a list of architectures
114+ - x86_64-unknown-linux-gnu
115+ - i686-unknown-linux-gnu
116+ - i586-unknown-linux-gnu
117+ - aarch64-unknown-linux-gnu
118+ - armv7-unknown-linux-gnueabihf
119+ - mips-unknown-linux-gnu
120+ - mips64-unknown-linux-gnuabi64
121+ - powerpc-unknown-linux-gnu
122+ - powerpc64-unknown-linux-gnu
123+ - riscv64gc-unknown-linux-gnu
124+ - s390x-unknown-linux-gnu
125+ - sparc64-unknown-linux-gnu
126+ - wasm32-unknown-unknown
127+
128+ steps :
129+ - uses : actions/checkout@v2
130+ - name : Setup Rust
131+ run : |
132+ rustup update nightly --no-self-update
133+ rustup default nightly
134+ rustup target add ${{ matrix.target }}
135+ # rustup component add clippy
136+ # - name: Run Clippy
137+ # run: cargo clippy --all-targets --target ${{ matrix.target }}
138+ - name : Build (release)
139+ run : cargo build --target ${{ matrix.target }} --release --all-features
140+
141+
142+ # - name: Run cargo-tarpaulin
143+ # uses: actions-rs/[email protected] 144+ # with:
145+ # args: '--features half -- --test-threads 1'
146+
147+ # - name: Upload to codecov.io
148+ # uses: codecov/codecov-action@v3
149+
150+
151+ # largely inspired by: https://github.com/rust-lang/portable-simd/blob/master/.github/workflows/ci.yml
0 commit comments