-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (80 loc) · 3.01 KB
/
build.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
name: build
on:
push:
branches:
- "**" # target all branches
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
RUST_BACKTRACE: full
jobs:
build_windows:
runs-on: windows-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install python toml package
run: python3 -m pip install toml
- name: Install rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(python3 ./build-tools/rust-version-extractor/rust-version-extractor.py)
- name: Build
run: cargo build --release --locked
- name: Run tests
run: cargo test --release --workspace
- name: Run doc tests
run: cargo test --release --doc
- name: Run all examples
shell: bash
run: ls examples/*.rs | xargs -n1 -I{} sh -c 'cargo run --example $(basename {} .rs)'
build_ubuntu:
env:
ML_CONTAINERIZED_TESTS: 1
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Update local dependency repositories
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential python3 python3-toml podman build-essential pkg-config libssl-dev
- name: Install rust deps
run: sudo apt-get install -yqq build-essential pkg-config libssl-dev
- name: Install rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(python3 ./build-tools/rust-version-extractor/rust-version-extractor.py)
- name: Build
run: cargo build --release --locked
- name: Run tests
run: cargo test --release --workspace
- name: Run doc tests
run: cargo test --release --doc
- name: Run all examples
run: ls examples/*.rs | xargs -n1 -I{} sh -c 'cargo run --example $(basename {} .rs)'
build_macos:
runs-on: macos-latest
# if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install python toml package
run: python3 -m pip install toml
- name: Install rust
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain $(python3 ./build-tools/rust-version-extractor/rust-version-extractor.py)
- name: Build
run: cargo build --release --locked
- name: Run tests
run: cargo test --release --workspace
- name: Run doc tests
run: cargo test --release --doc
- name: Run all examples
run: ls examples/*.rs | xargs -n1 -I{} sh -c 'cargo run --example $(basename {} .rs)'