Skip to content

Commit caec727

Browse files
committed
Add github action
1 parent 8359f64 commit caec727

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and Test fft-convolution
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
format:
14+
name: Check Format
15+
runs-on: macos-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rust
20+
uses: dtolnay/rust-toolchain@stable
21+
with:
22+
components: rustfmt
23+
- name: Check formatting
24+
run: cargo fmt --check
25+
26+
build:
27+
name: Build and Test
28+
needs: format
29+
strategy:
30+
matrix:
31+
os: [macos-latest, macos-14, ubuntu-latest]
32+
include:
33+
- os: macos-latest
34+
target: x86_64-apple-darwin
35+
- os: macos-14
36+
target: aarch64-apple-darwin
37+
- os: ubuntu-latest
38+
target: x86_64-unknown-linux-gnu
39+
runs-on: ${{ matrix.os }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Install Rust
45+
uses: dtolnay/rust-toolchain@stable
46+
with:
47+
targets: ${{ matrix.target }}
48+
49+
- name: Rust Cache
50+
uses: Swatinem/rust-cache@v2
51+
52+
- name: Build
53+
run: cargo build --release --target ${{ matrix.target }}
54+
55+
- name: Run tests
56+
run: cargo test --release --target ${{ matrix.target }}
57+

0 commit comments

Comments
 (0)