-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (46 loc) · 1.36 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
name: Rust
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
steps:
- name: Install LLVM and Clang # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@f8f2154d96f018dcb600739c4978bfc35f435422
if: matrix.config.os == 'windows-latest'
with:
version: "11.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV
if: matrix.config.os == 'windows-latest'
- uses: actions/checkout@v2
with:
submodules: recursive
- name: install dependencies
run: ./install-dependencies.sh
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: Build with system-installed HiGHS
if: matrix.config.os != 'windows-latest'
run: |
cd HiGHS
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
sudo cmake --install build
cd ..
cargo clean
cargo build --no-default-features --features "discover"