-
Notifications
You must be signed in to change notification settings - Fork 5
72 lines (58 loc) · 1.86 KB
/
testing-cpp.yml
File metadata and controls
72 lines (58 loc) · 1.86 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
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:
include:
- os: ubuntu-latest
gen_script: bash gen.sh
cmake_config: cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Debug
run_loader: ./bin/loader
- os: windows-latest
gen_script: cmd /c gen.bat
cmake_config: cmake -S . -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Debug
run_loader: .\bin\loader.exe
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: 1.21.x
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
shell: bash
run: bash init.sh
- name: Generate protoconf
working-directory: test/cpp-tableau-loader
run: ${{ matrix.gen_script }}
- name: CMake Configure
working-directory: test/cpp-tableau-loader
run: ${{ matrix.cmake_config }}
- 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 }}