forked from blas-lapack-rs/openblas-src
-
Notifications
You must be signed in to change notification settings - Fork 0
134 lines (127 loc) · 3.75 KB
/
openblas-src.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: openblas-src
on:
push:
branches:
- master
paths:
- 'openblas-build/**'
- 'openblas-src/**'
- '.github/workflows/openblas-src.yml'
- '*.toml'
pull_request:
paths:
- 'openblas-build/**'
- 'openblas-src/**'
- '.github/workflows/openblas-src.yml'
- '*.toml'
workflow_dispatch: {}
jobs:
windows-msvc:
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
triple:
- x64-windows
- x64-windows-static
- x64-windows-static-md
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ./vcpkg
key: vcpkg-openblas-${{ matrix.triple }}
- name: Install vcpkg
run: |
git clone https://github.com/Microsoft/vcpkg.git --depth 1
cd vcpkg
./bootstrap-vcpkg.bat
- name: Install OpenBLAS by vcpkg
run: |
./vcpkg/vcpkg.exe install openblas:${{ matrix.triple }}
- name: Test features=system
run: cargo test --features=system --manifest-path=openblas-src/Cargo.toml
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
if: ${{ matrix.triple == 'x64-windows' }}
- name: Test features=system,static
run: cargo test --features=system,static --manifest-path=openblas-src/Cargo.toml
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
if: ${{ matrix.triple == 'x64-windows-static-md' }}
- name: Test features=system,static with crt-static
run: cargo test --features=system,static --manifest-path=openblas-src/Cargo.toml
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
RUSTFLAGS: "-C target-feature=+crt-static"
if: ${{ matrix.triple == 'x64-windows-static' }}
macos:
runs-on: macos-14
strategy:
fail-fast: false
matrix:
feature:
- ""
- static
- system
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install OpenBLAS by homebrew
run: |
brew install openblas
if: ${{ contains(matrix.feature, 'system') }}
- name: Test features=${{ matrix.feature }}
run: cargo test --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml
x86_64-unknown-linux-gnu:
runs-on: ubuntu-22.04
container:
image: rust
strategy:
fail-fast: false
matrix:
feature:
- ""
- static
- system
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Install gfortran by apt
run: |
apt update
apt install -y gfortran
- name: Install OpenBLAS by apt
run: |
apt update
apt install -y libopenblas-dev
if: ${{ contains(matrix.feature, 'system') }}
- name: Test features=${{ matrix.feature }}
run: cargo test --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml
cross:
name: ${{matrix.target}} (${{matrix.feature}})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature:
- ""
- static
- system
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
target: ${{matrix.target}}
- name: Install Cross
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Test features=${{ matrix.feature }}
run: cross test --target ${{matrix.target}} --features=${{ matrix.feature }} --manifest-path=openblas-src/Cargo.toml