-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (80 loc) · 2.47 KB
/
ci.yml
File metadata and controls
92 lines (80 loc) · 2.47 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
name: CI
on:
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build-test-docs:
name: Build + Test + Docs
runs-on: ubuntu-22.04
env:
CARGO_TERM_COLOR: always
CMAKE_BUILD_PARALLEL_LEVEL: 2
steps:
- name: Checkout (with submodules)
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Show selected dependency revisions
shell: bash
run: |
set -euo pipefail
git submodule status --recursive
echo
echo "siderust-ffi: $(git -C siderust-ffi rev-parse HEAD) ($(git -C siderust-ffi describe --tags --always 2>/dev/null || true))"
echo "siderust: $(git -C siderust-ffi/siderust rev-parse HEAD) ($(git -C siderust-ffi/siderust describe --tags --always 2>/dev/null || true))"
- name: Install system dependencies
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
cmake \
ninja-build \
pkg-config \
libssl-dev \
doxygen \
graphviz
- name: Set up Rust (stable)
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Cache cargo + build artifacts
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
siderust-ffi/target
siderust-ffi/siderust/dev-deps/tempoch/tempoch-ffi/target
qtty-cpp/qtty/target
qtty-cpp/qtty/qtty-ffi/target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Configure (CMake)
shell: bash
run: |
set -euo pipefail
cmake -S . -B build -G Ninja -DSIDERUST_BUILD_DOCS=ON
- name: Build
shell: bash
run: |
set -euo pipefail
cmake --build build --target test_siderust
- name: Test (ctest)
shell: bash
run: |
set -euo pipefail
ctest --test-dir build --output-on-failure -L siderust_cpp
- name: Build docs (Doxygen)
shell: bash
run: |
set -euo pipefail
cmake --build build --target docs