Skip to content

Commit 11e7808

Browse files
committed
Add continuous integration
1 parent f3f735a commit 11e7808

File tree

3 files changed

+96
-1
lines changed

3 files changed

+96
-1
lines changed

.github/workflows/CI.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
on:
2+
push:
3+
branches: [master]
4+
pull_request:
5+
6+
name: CI
7+
8+
jobs:
9+
build-linux:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
rust:
14+
- stable
15+
- nightly
16+
steps:
17+
- run: sudo apt-get update -y
18+
- run: sudo apt-get install -y libmfem-dev
19+
- uses: actions/checkout@v2
20+
- run: |
21+
git submodule init
22+
git submodule update
23+
- run: |
24+
rustup update ${{ matrix.rust }}
25+
rustup default ${{ matrix.rust }}
26+
rustup component add clippy
27+
- run: cargo clippy -p mfem-sys -- -D warnings
28+
- run: cargo build -p mfem-sys
29+
- run: cargo run -p mfem-sys --example ex1 -- --mesh data/square.mesh
30+
31+
build-osx:
32+
runs-on: macos-latest
33+
strategy:
34+
matrix:
35+
rust:
36+
- stable
37+
- nightly
38+
steps:
39+
- run: brew update
40+
- run: brew install mfem
41+
- uses: actions/checkout@v2
42+
- run: |
43+
rustup update ${{ matrix.rust }}
44+
rustup default ${{ matrix.rust }}
45+
- run: cargo build -p mfem-sys
46+
- run: cargo run -p mfem-sys --example ex1 -- --mesh data/square.mesh
47+
48+
build-windows:
49+
runs-on: windows-latest
50+
strategy:
51+
matrix:
52+
rust:
53+
- stable
54+
- nightly
55+
steps:
56+
- uses: actions/checkout@v2
57+
- run: |
58+
rustup update ${{ matrix.rust }}
59+
rustup default ${{ matrix.rust }}
60+
- run: cargo build -p mfem-sys
61+
- run: cargo run -p mfem-sys --example ex1 -- --mesh data/square.mesh
62+
63+
fmt:
64+
name: Rust fmt
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v2
68+
- run: |
69+
rustup update
70+
rustup default stable
71+
rustup component add rustfmt
72+
- run: cargo fmt --all -- --check

crates/mfem-sys/build.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/// The list of used MFEM libraries which needs to be linked with.
21

32
fn main() {
43
let target = std::env::var("TARGET").expect("No TARGET environment variable defined");

data/square.mesh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
MFEM mesh v1.0
2+
3+
dimension
4+
2
5+
6+
elements
7+
2
8+
1 2 0 1 2
9+
1 2 0 2 3
10+
11+
boundary
12+
4
13+
1 1 0 1
14+
1 1 1 2
15+
1 1 2 3
16+
1 1 3 0
17+
18+
vertices
19+
4
20+
2
21+
0.0 0.0
22+
1.0 0.0
23+
1.0 1.0
24+
0.0 1.0

0 commit comments

Comments
 (0)