-
Notifications
You must be signed in to change notification settings - Fork 5
99 lines (82 loc) · 2.73 KB
/
testing-cpp.yml
File metadata and controls
99 lines (82 loc) · 2.73 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
99
name: Testing C++
# Trigger on pushes, PRs (excluding documentation changes), and nightly.
on:
push:
branches: [ master, main ]
pull_request:
schedule:
- cron: 0 0 * * * # daily at 00:00
workflow_dispatch:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest ]
go-version: [ 1.24.x ]
protobuf-version: [ "32.0", "3.19.3" ]
include:
- os: ubuntu-latest
init_script: bash init.sh
run_loader: ./bin/loader
- os: windows-latest
init_script: cmd /c init.bat
run_loader: .\bin\loader.exe
name: test (${{ matrix.os }}, protobuf ${{ matrix.protobuf-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y cmake ninja-build
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: choco install cmake ninja -y
- name: Setup MSVC (Windows)
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Init submodules and build protobuf
run: ${{ matrix.init_script }}
env:
PROTOBUF_REF: v${{ matrix.protobuf-version }}
- name: Install Protoc
if: "!startsWith(matrix.protobuf-version, '3.')"
uses: arduino/setup-protoc@v3
with:
version: ${{ matrix.protobuf-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Protoc (legacy)
if: startsWith(matrix.protobuf-version, '3.')
uses: arduino/setup-protoc@v1
with:
version: ${{ matrix.protobuf-version }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Buf
uses: bufbuild/buf-action@v1
with:
version: 1.67.0
setup_only: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate protoconf
working-directory: test/cpp-tableau-loader
run: buf generate ..
- name: CMake Configure
working-directory: test/cpp-tableau-loader
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_CXX_STANDARD=17
- name: CMake Build
working-directory: test/cpp-tableau-loader
run: cmake --build build --parallel
- name: Run loader
working-directory: test/cpp-tableau-loader
run: ${{ matrix.run_loader }}