-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (118 loc) · 4.04 KB
/
main.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: CI
on: [pull_request]
env:
MODALITY_BUILD_TYPE: "ci"
jobs:
stable_build_and_test:
name: Stable Build and Test Rust
timeout-minutes: 90
runs-on: ubuntu-20.04
steps:
- name: Install system packages
run: sudo apt-get install -y libusb-1.0-0-dev graphviz clang llvm stunnel python3 python3-dev
- name: Use clang as cc
run: sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
- name: Free up some disk space
run: |
echo "----------------------------------------------"
echo "BEFORE: "
sudo df -h /
echo "----------------------------------------------"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
echo "----------------------------------------------"
echo "AFTER: "
sudo df -h /
echo "----------------------------------------------"
- name: Checkout
uses: actions/checkout@v2
- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
toolchain: stable
override: true
- name: Put local cargo bin on the path
run: |
echo "~/.cargo/bin" >> $GITHUB_PATH
- name: Print tool versions
run: |
echo `rustup default`
echo `which rustc`
echo `which cargo`
echo `which cargo-clippy`
echo `which cargo-fmt`
echo `rustc --version`
echo `cargo --version`
echo `cargo-clippy --version`
echo `cargo-fmt --version`
- name: Fetch deps
run: cargo fetch
working-directory: ./client-libraries/rust
- name: Lint with Clippy
run: cargo clippy
working-directory: ./client-libraries/rust
- name: Rust unit tests
run: cargo test --all-features --all-targets -- --test-threads 1
working-directory: ./client-libraries/rust
- name: Lint C API with Clippy
run: cargo clippy --all --all-features --no-deps -- -W clippy::all -D warnings
working-directory: ./client-libraries/c
- name: Build C API Tests
run: make all
working-directory: ./client-libraries/c/ctest
- name: Python unit tests
run: |
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
./build-and-test.sh
working-directory: ./client-libraries/python/auxon-sdk
- name: Integration tests
run: ./go.sh
working-directory: ./integration-test
windows:
name: Windows Rust
timeout-minutes: 90
runs-on: windows-latest
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- name: Pre-Checkout Total Space
shell: pwsh
run: |
Get-CimInstance -ClassName Win32_LogicalDisk
- name: Checkout
uses: actions/checkout@v2
- name: Install stable rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: rustfmt, clippy
toolchain: stable
override: true
# See https://github.com/aws/aws-lc/issues/1477
- name: Install nasm
uses: ilammy/setup-nasm@v1
- name: Fetch deps
run: cargo fetch
working-directory: ./client-libraries/rust
- name: Post-Deps Clear Temp Dir
shell: pwsh
run: |
Remove-Item -Path $env:TEMP\* -Recurse -Force -ErrorAction SilentlyContinue
- name: Post-Deps Total Space
shell: pwsh
run: |
Get-CimInstance -ClassName Win32_LogicalDisk
- name: Lint with Clippy
run: cargo clippy
working-directory: ./client-libraries/rust
- name: Test
run: cargo test --all-features --all-targets
working-directory: ./client-libraries/rust
- name: Lint C API with Clippy
run: cargo clippy
working-directory: ./client-libraries/c