-
Notifications
You must be signed in to change notification settings - Fork 107
74 lines (68 loc) · 2.41 KB
/
test.yaml
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
name: test
on: [ push, pull_request ]
jobs:
linux-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: install dependencies
run: |
sudo apt update
sudo apt install -y g++
- name: Run test
run: |
g++ --version
cmake -S . -B build -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 4
./build/tests/flexbuffers/reflect-cpp-flexbuffers-tests
./build/tests/json/reflect-cpp-json-tests
./build/tests/xml/reflect-cpp-xml-tests
./build/tests/yaml/reflect-cpp-yaml-tests
linux-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- uses: KyleMayes/install-llvm-action@v1
with:
version: "16"
- name: link clang lib
run: |
sudo mkdir -p /usr/lib/llvm-16/lib
sudo ln -s clang /usr/lib/llvm-16/lib/clang
working-directory: ${{ env.LLVM_PATH }}/lib
- name: Run test
env:
CC: clang
CXX: clang++
run: |
clang --version
cmake -S . -B build -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_FLEXBUFFERS=ON -DREFLECTCPP_XML=ON -DREFLECTCPP_YAML=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 4
./build/tests/flexbuffers/reflect-cpp-flexbuffers-tests
./build/tests/json/reflect-cpp-json-tests
./build/tests/xml/reflect-cpp-xml-tests
./build/tests/yaml/reflect-cpp-yaml-tests
# The latest MSVC version on GitHub Actions has a bug, and it's difficult to switch to another version.
# Re-enable this when the bug is fixed.
# windows-msvc:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: true
# - uses: ilammy/msvc-dev-cmd@v1
# - uses: lukka/run-vcpkg@v11
# - name: Run test
# run: |
# cmake -S . -B build -DREFLECTCPP_BUILD_TESTS=ON -DREFLECTCPP_FLEXBUFFERS=ON
# cmake --build build -j 4
# .\build\tests\flexbuffers\Release\reflect-cpp-flexbuffers-tests.exe
# .\build\tests\json\Release\reflect-cpp-json-tests.exe