-
-
Notifications
You must be signed in to change notification settings - Fork 11
46 lines (41 loc) · 1.47 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
name: Build and test
on: [push, pull_request]
jobs:
linux:
name: Build & Test Linux
runs-on: ubuntu-latest
services:
sqlserver:
image: mcr.microsoft.com/mssql/server:2017-latest-ubuntu
ports:
- 1433:1433
env:
ACCEPT_EULA: Y
SA_PASSWORD: My@Test@Password1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install latests rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
# selecting a toolchain either by action or manual `rustup` calls should happen
# before the plugin, as the cache uses the current rustc version as its cache key
- name: Rust build cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build
- name: Install ODBC Drivers
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
apt-get update
ACCEPT_EULA=Y apt-get install -y msodbcsql17
ln -s /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.*.so.* /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.so
shell: sudo bash {0}
- name: Print odbcinst.ini
run: cat /etc/odbcinst.ini
- name: Test
run: cargo test