-
Notifications
You must be signed in to change notification settings - Fork 13
37 lines (30 loc) · 1.25 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
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: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -S . -DENABLE_UNIT_TESTING=1 -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build -j $(nproc)
- name: Run Tests
run: |
python3 run_tests.py