-
-
Notifications
You must be signed in to change notification settings - Fork 143
98 lines (95 loc) · 3.09 KB
/
build-linux.yml
File metadata and controls
98 lines (95 loc) · 3.09 KB
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
name: Build Linux
on:
push:
branches: [main, linux, "linux/**", "feat/linux-**"]
paths:
- "linux/**"
- ".github/workflows/build-linux.yml"
pull_request:
paths:
- "linux/**"
- ".github/workflows/build-linux.yml"
schedule:
- cron: "13 14 * * 1"
workflow_dispatch:
jobs:
fast:
name: Fast checks
runs-on: ubuntu-24.04
# ubuntu-24.04 ships glib 2.80, but libadwaita 1.6 (workspace pin)
# transitively requires gio-2.0 >= 2.82. Building inside ubuntu:25.10
# gives us glib 2.84, which satisfies the system-deps check. The
# integration job stays on the host runner — driver crates depend
# only on tablepro-core, so they don't pull in libadwaita.
container:
image: ubuntu:25.10
env:
DEBIAN_FRONTEND: noninteractive
defaults:
run:
working-directory: linux
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event_name == 'schedule' && 'linux' || github.ref }}
- name: Install system dependencies
# ubuntu:25.10 is minimal — git for Swatinem/rust-cache key
# generation, curl + ca-certificates for rust-toolchain's
# rustup install, plus the GTK / libadwaita / sourceview /
# OpenSSL / libsecret -dev packages the workspace links.
# No sudo (container runs as root by default).
run: |
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
pkg-config \
libgtk-4-dev \
libadwaita-1-dev \
libgtksourceview-5-dev \
libssl-dev \
libsecret-1-dev
- uses: dtolnay/rust-toolchain@1.93
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: linux
- name: Format check
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --workspace
- name: Unit tests
run: cargo test --workspace --lib
integration:
name: Driver integration tests (docker)
runs-on: ubuntu-24.04
needs: fast
defaults:
run:
working-directory: linux
steps:
- uses: actions/checkout@v5
with:
ref: ${{ github.event_name == 'schedule' && 'linux' || github.ref }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libssl-dev
- uses: dtolnay/rust-toolchain@1.93
- uses: Swatinem/rust-cache@v2
with:
workspaces: linux
- name: Verify docker is available
run: docker version
- name: Postgres integration tests
run: cargo test --test integration -p tablepro-driver-postgres -- --include-ignored --test-threads=1
- name: MySQL integration tests
run: cargo test --test integration -p tablepro-driver-mysql -- --include-ignored --test-threads=1