-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
65 lines (55 loc) · 1.95 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
name: C++ CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
env:
ABSEIL_VERSION: '20260526.0'
ABSEIL_SHA256: 6e1aee535473414164bf83e4ebc40240dec71a4701f8a642d906e95bea1aea0c
steps:
- uses: actions/checkout@v4
- name: Install C++ dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
g++ \
libarmadillo-dev \
liblapack-dev \
libopenblas-dev
- name: Build Abseil dependency
run: |
archive="$RUNNER_TEMP/abseil-cpp-${ABSEIL_VERSION}.tar.gz"
curl -fsSL \
"https://github.com/abseil/abseil-cpp/releases/download/${ABSEIL_VERSION}/abseil-cpp-${ABSEIL_VERSION}.tar.gz" \
-o "$archive"
echo "${ABSEIL_SHA256} ${archive}" | sha256sum -c -
tar -xzf "$archive" -C "$RUNNER_TEMP"
cmake \
-S "$RUNNER_TEMP/abseil-cpp-${ABSEIL_VERSION}" \
-B "$RUNNER_TEMP/abseil-build" \
-DABSL_BUILD_TESTING=OFF \
-DABSL_ENABLE_INSTALL=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$RUNNER_TEMP/abseil"
cmake --build "$RUNNER_TEMP/abseil-build" --target install --parallel 2
- name: Configure CMake build
run: >-
cmake -S . -B build
-DCMAKE_PREFIX_PATH="$RUNNER_TEMP/abseil"
-DFASTCPD_BUILD_EXAMPLES=ON
- name: Build and run CMake example
run: |
cmake --build build --target fastcpd_cpp_example --parallel 2
./build/fastcpd_cpp_example
- name: Validate CMake installation
run: cmake --install build --prefix "$RUNNER_TEMP/fastcpd-install"
- name: Build and run Make example
run: |
make -C examples/cpp clean all ABSL_INCLUDE="$RUNNER_TEMP/abseil/include"
./examples/cpp/simple