forked from krtab/sundials-sys
-
Notifications
You must be signed in to change notification settings - Fork 4
92 lines (91 loc) · 3.14 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
name: Cargo Build & Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [stable, stable-vendor, beta, nightly, macos, macos-aarch64, win64, win64-vendor]
include:
- build: stable
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: stable-vendor
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
sundials: v7.0.0 v6.7.0 v6.6.2 v6.6.1 v6.6.0 v6.5.1 v6.5.0 v6.4.1 v6.4.0 v6.3.0 v6.2.0 v6.1.1 v6.1.0 v6.0.0
- build: beta
os: ubuntu-latest
rust: beta
target: x86_64-unknown-linux-gnu
- build: nightly
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos-aarch64
# Must install app https://github.com/apps/flyci-prod
os: flyci-macos-large-latest-m1
rust: stable
target: aarch64-apple-darwin
- build: win64
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
- build: win64-vendor
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
# - build: windows-aarch64
# # No Windows arm64 workers at the moment.
# # https://github.com/actions/runner-images/issues/768
# os: windows-latest
# rust: stable
# target: aarch64-pc-windows-msvc
steps:
- uses: actions/checkout@master
- run: git submodule init
- run: git submodule update
- name: Set up vcpkg on Windows
if: startsWith(matrix.os, 'windows') && ! contains(matrix.build, 'vendor')
run: |
git clone https://github.com/microsoft/vcpkg
& .\vcpkg\bootstrap-vcpkg.bat
& .\vcpkg\vcpkg install sundials --triplet=x64-windows
- name: Install Ubuntu packages
if: startsWith(matrix.os, 'ubuntu') && ! contains(matrix.build, 'vendor')
run: |
sudo apt-get update && sudo apt-get -y install libsundials-dev
- name: Install Rust (rustup)
run: |
rustup update --no-self-update
rustup default ${{ matrix.rust }}-${{ matrix.target }}
- run: cargo build
- run: cargo test --features cvodes,idas
- name: Test KLU
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get install libsuitesparse-dev pkg-config
cargo test --features klu
- name: Test various versions of Sundials
if: startsWith(matrix.os, 'ubuntu') && contains(matrix.build, 'vendor')
run: |
cd vendor
git fetch origin
git reset --hard --quiet origin/main
cd ..
for v in ${{ matrix.sundials }}; do
echo "▪▪▪ $v ▪▪▪"
cd vendor
git checkout $v
cd ..
cargo clean
cargo test --features build_libraries,cvodes,idas
done