-
Notifications
You must be signed in to change notification settings - Fork 133
138 lines (118 loc) · 4.18 KB
/
run-all.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
138
name: run all
on:
pull_request:
branches: [ main ]
workflow_dispatch:
push:
branches:
- main
jobs:
build-linux:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: update package index
run: sudo apt-get -y update
- name: setup environment
run: |
sudo apt-get install --no-install-recommends \
cmake \
g++ \
gcovr \
git \
libasio-dev \
libboost-test-dev \
libgl1-mesa-dev \
libtclap-dev \
ninja-build \
nlohmann-json3-dev \
qt6-base-dev \
ruby \
ruby-dev
- name: install ruby tools
run: |
sudo gem install bundler
sudo bundle install
- name: install gtest
run: |
git clone https://github.com/google/googletest.git
cd googletest
mkdir build
cd build
cmake ../
cmake --build . --parallel
sudo cmake --install .
- name: build and run
run: |
./run-linux.sh
- name: code coverage summary report
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: coverage/cobertura.xml
indicators: false
hide_complexity: true
format: markdown
output: file
- name: publish code coverage summary
run: |
echo '# Code Coverage Report' >> $GITHUB_STEP_SUMMARY
cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
build-windows:
# You can find specific tool versions for Windows builds in the Runner specification:
# https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
# In particular, this build uses:
# cmake: 3.27.9
# VSCode: 2022 Enterprise Edition (corresponding C++ version: https://blog.knatten.org/2022/08/26/microsoft-c-versions-explained/)
# Ruby: 3.0.6p216
# boost: 1.82.0
runs-on: windows-2022
env:
BOOST_VERSION: 1.82.0
NLOHMANN_CLONE_DIR: nlohmann
NLOHMANN_TAG: v3.11.3
ASIO_CLONE_DIR: asio
ASIO_TAG: asio-1-29-0
TCLAP_CLONE_DIR: tclap
TCLAP_TAG: v1.2.5
steps:
- uses: actions/checkout@v4
- name: install ruby tools
run: |
gem install bundler
bundle install
# - name: Install Google Test
# uses: MarkusJx/googletest-installer@v1.1
- name: Restore cached boost dependencies
id: cache-boost-deps
uses: actions/cache@v3
with:
path: |
boost_1_82_0
key: ${{ runner.os }}-boost-1820
- name: install boost
if: steps.cache-boost-deps.outputs.cache-hit != 'true'
run: |
$boost_version_str = ${Env:BOOST_VERSION}.Replace(".","_")
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://boostorg.jfrog.io/artifactory/main/release/${Env:BOOST_VERSION}/source/boost_${boost_version_str}.zip -OutFile boost_${boost_version_str}.zip
7z x boost_${boost_version_str}.zip
cd boost_${boost_version_str}
cmd /C bootstrap
./b2.exe --build-type=complete toolset=msvc --with-regex --with-program_options --with-system --with-test
- name: Get and build nlohmann-json
run: |
Start-Process "git" -ArgumentList "clone https://github.com/nlohmann/json.git $Env:NLOHMANN_CLONE_DIR --depth 1 --branch $Env:NLOHMANN_TAG" -PassThru -NoNewWindow -Wait
cd $Env:NLOHMANN_CLONE_DIR
cmake -B build -S .
cd ..
- name: Get ASIO
run: Start-Process "git" -ArgumentList "clone https://github.com/chriskohlhoff/asio.git $Env:ASIO_CLONE_DIR --depth 1 --branch $Env:ASIO_TAG" -PassThru -NoNewWindow -Wait
- name: Get TCLAP
run: Start-Process "git" -ArgumentList "clone https://github.com/mirror/tclap.git $Env:TCLAP_CLONE_DIR --depth 1 --branch $Env:TCLAP_TAG" -PassThru -NoNewWindow -Wait
- name: build and run
run: |
$current_script_dir = Get-Location | Select-Object -Expand "Path"
$Env:nlohmann_json_DIR = "${current_script_dir}/$Env:NLOHMANN_CLONE_DIR/build"
$Env:Asio_ROOT = "${current_script_dir}/$Env:ASIO_CLONE_DIR/asio"
$Env:TCLAP_ROOT = "${current_script_dir}/$Env:TCLAP_CLONE_DIR"
./run-windows.ps1