-
Notifications
You must be signed in to change notification settings - Fork 12
137 lines (113 loc) · 4.61 KB
/
main.yml
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI
on: [push]
jobs:
build-ubuntu:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up vcpkg
run: |
# Workaround for failing grub-efi installation during upgrade
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt update
sudo apt upgrade -y
sudo apt install -y cmake
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Download Unit Test Designs
run: |
python -m pip install -r test/py/requirements.txt
python test/py/testing.py --download_repos true --database_file_path repos.yaml --third_party_path test/designs
- name: Create Unit Tests
run: |
python test/py/testing.py --generate_unit_tests true --database_file_path repos.yaml --unit_test_path test/src/generated_tests --third_party_path test/designs
- name: Build Library, CLI Application and Tests
run: |
export VCPKG_ROOT=$(realpath ./vcpkg)
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
cmake --preset release -DENABLE_UNIT_TESTING=ON
cmake --build --preset release
- name: Run Tests
run: |
python3 run_tests.py
build-macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- name: Set up vcpkg
run: |
brew install cmake git
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Download Unit Test Designs
run: |
python -m pip install -r test/py/requirements.txt
python test/py/testing.py --download_repos true --database_file_path repos.yaml --third_party_path test/designs
- name: Create Unit Tests
run: |
python test/py/testing.py --generate_unit_tests true --database_file_path repos.yaml --unit_test_path test/src/generated_tests --third_party_path test/designs
- name: Build Library and CLI Application
run: |
export VCPKG_ROOT=$(realpath ./vcpkg)
export CMAKE_BUILD_PARALLEL_LEVEL=2
cmake --preset release -DENABLE_UNIT_TESTING=ON
cmake --build --preset release
- name: Run Tests
run: |
python3 run_tests.py
build-windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
- name: Download Unit Test Designs
run: |
${ENV:PYTHONUTF8}=1
git config --system core.longpaths true
python -m pip install -r test/py/requirements.txt
python test/py/testing.py --download_repos true --database_file_path repos.yaml --third_party_path test\designs
- name: Create Unit Tests
run: |
${ENV:PYTHONUTF8}=1
git config --system core.longpaths true
python test/py/testing.py --generate_unit_tests true --database_file_path repos.yaml --unit_test_path test\src\generated_tests --third_party_path test\designs
- name: Build Library and CLI Application
run: |
${ENV:VCPKG_ROOT}=$(Resolve-Path ./vcpkg)
${ENV:CMAKE_BUILD_PARALLEL_LEVEL}=2
cmake --preset release -DENABLE_UNIT_TESTING=ON
cmake --build --preset release
build-mingw:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up vcpkg
run: |
# Workaround for failing grub-efi installation during upgrade
echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates
sudo apt update
sudo apt upgrade -y
sudo apt install -y cmake
git clone https://github.com/microsoft/vcpkg.git
./vcpkg/bootstrap-vcpkg.sh
- name: Download Unit Test Designs
run: |
python -m pip install -r test/py/requirements.txt
python test/py/testing.py --download_repos true --database_file_path repos.yaml --third_party_path test/designs
- name: Create Unit Tests
run: |
python test/py/testing.py --generate_unit_tests true --database_file_path repos.yaml --unit_test_path test/src/generated_tests --third_party_path test/designs
- name: Build Library, CLI Application and Tests
run: |
sudo apt update
sudo apt install -y g++-mingw-w64-x86-64-win32
export VCPKG_ROOT=$(realpath ./vcpkg)
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
cmake --preset release -DENABLE_UNIT_TESTING=ON -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=./mingw-w64-x86_64.cmake
cmake --build --preset release
- name: Run Tests
run: |
python3 run_tests.py