1+ name : Benchmark
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches :
7+ - benchmarking
8+
9+ jobs :
10+ Build-MSVC-Windows :
11+ runs-on : windows-latest
12+
13+ strategy :
14+ fail-fast : false
15+ matrix :
16+ build_type : [Release]
17+
18+ steps :
19+ - uses : actions/checkout@v4
20+
21+ - name : Append the directory of 'vcvarsall.bat' to PATH environment variable
22+ uses : myci-actions/export-env-var-powershell@1
23+ with :
24+ name : PATH
25+ value : $env:PATH;C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build
26+
27+ - name : Install Seaborn
28+ run : |
29+ pip install seaborn
30+
31+ - name : Configure CMake
32+ working-directory : ./
33+ run : |
34+ cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}}
35+
36+ - name : Build the Test
37+ working-directory : ./Build
38+ run : |
39+ cmake --build . --config=${{matrix.build_type}}
40+
41+ - name : Install the Test
42+ working-directory : ./Build
43+ run : |
44+ cmake --install . --config=${{matrix.build_type}}
45+
46+ - name : Run the Test
47+ working-directory : D:/a/Json-Performance/Json-Performance/Install/bin/
48+ run : |
49+ ./Json-Performance
50+ continue-on-error : true
51+
52+ - name : Commit and push the changes to a temp branch.
53+ env :
54+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
55+ working-directory : D:/a/Json-Performance/Json-Performance/
56+ run : |
57+ git config --global user.email "[email protected] " 58+ git config --global user.name "RealTimeChris"
59+ git checkout -b temp-branch-msvc-windows
60+ git add .
61+ git commit -m "Updates - MSVC-Windows"
62+ git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/RealTimeChris/Json-Performance.git temp-branch-msvc-windows
63+
64+ Build-GCC-Ubuntu :
65+ runs-on : ubuntu-latest
66+
67+ strategy :
68+ fail-fast : false
69+ matrix :
70+ build_type : [Release]
71+
72+ steps :
73+ - uses : actions/checkout@v4
74+
75+ - name : Install Seaborn
76+ run : |
77+ pip install seaborn
78+
79+ - name : Install the latest gcc compiler.
80+ working-directory : ./
81+ run : |
82+ sudo apt-get install build-essential
83+ sudo apt-get install g++-12
84+
85+ - name : Configure CMake
86+ working-directory : ./
87+ run : |
88+ cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=/usr/bin/g++-12
89+
90+ - name : Build the Test
91+ working-directory : ./Build
92+ run : |
93+ cmake --build . --config=${{matrix.build_type}}
94+
95+ - name : Install the Test
96+ working-directory : ./Build
97+ run : |
98+ sudo cmake --install . --config=${{matrix.build_type}}
99+ sudo chmod +x /home/runner/work/Json-Performance/Json-Performance/Install/bin/Json-Performance
100+
101+ - name : Run the Test
102+ working-directory : /home/runner/work/Json-Performance/Json-Performance/Install/bin/
103+ run : |
104+ ./Json-Performance
105+ continue-on-error : true
106+
107+ - name : Commit and push the changes to a temp branch.
108+ env :
109+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110+ working-directory : /home/runner/work/Json-Performance/Json-Performance/
111+ run : |
112+ sudo git config --global user.email "[email protected] " 113+ sudo git config --global user.name "RealTimeChris"
114+ sudo git checkout -b temp-branch-gcc-ubuntu
115+ sudo git add .
116+ sudo git commit -m "Updates - GCC-Ubuntu"
117+ sudo git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/RealTimeChris/Json-Performance.git temp-branch-gcc-ubuntu
118+
119+ Build-CLANG-Ubuntu :
120+ runs-on : ubuntu-latest
121+
122+ strategy :
123+ fail-fast : false
124+ matrix :
125+ build_type : [Release]
126+
127+ steps :
128+ - uses : actions/checkout@v4
129+
130+ - name : Install the latest Clang compiler.
131+ run : |
132+ sudo apt update && sudo apt upgrade
133+ wget https://apt.llvm.org/llvm.sh
134+ chmod u+x llvm.sh
135+ sudo ./llvm.sh 19
136+
137+ - name : Install Seaborn
138+ run : |
139+ sudo pip install seaborn
140+
141+ - name : Configure CMake
142+ working-directory : ./
143+ run : |
144+ cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=/usr/bin/clang++-19
145+
146+ - name : Build the Test
147+ working-directory : ./Build
148+ run : |
149+ cmake --build . --config=${{matrix.build_type}}
150+
151+ - name : Install the Test
152+ working-directory : ./Build
153+ run : |
154+ sudo cmake --install . --config=${{matrix.build_type}}
155+ sudo chmod +x /home/runner/work/Json-Performance/Json-Performance/Install/bin/Json-Performance
156+
157+ - name : Run the Test
158+ working-directory : /home/runner/work/Json-Performance/Json-Performance/Install/bin/
159+ run : |
160+ ./Json-Performance
161+ continue-on-error : true
162+
163+ - name : Commit and push the changes to a temp branch.
164+ env :
165+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
166+ working-directory : /home/runner/work/Json-Performance/Json-Performance/
167+ run : |
168+ sudo git config --global user.email "[email protected] " 169+ sudo git config --global user.name "RealTimeChris"
170+ sudo git checkout -b temp-branch-clang-ubuntu
171+ sudo git add .
172+ sudo git commit -m "Updates - CLANG-Ubuntu"
173+ sudo git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/RealTimeChris/Json-Performance.git temp-branch-clang-ubuntu
174+
175+ Build-CLANG-MacOS :
176+ runs-on : macos-latest
177+
178+ strategy :
179+ fail-fast : false
180+ matrix :
181+ build_type : [Release]
182+
183+ steps :
184+ - uses : actions/checkout@v4
185+
186+ - name : Set up Python
187+ uses : actions/setup-python@v5
188+ with :
189+ python-version : ' 3.x'
190+
191+ - name : Create requirements.txt
192+ run : |
193+ echo seaborn > requirements.txt
194+ echo matplotlib >> requirements.txt
195+ echo pandas >> requirements.txt
196+
197+ - name : Install dependencies
198+ run : |
199+ python -m venv env
200+ source env/bin/activate
201+ pip install -r requirements.txt
202+
203+ - name : Install the latest clang compiler.
204+ run : |
205+ brew install llvm
206+
207+ - name : Configure CMake
208+ working-directory : ./
209+ run : |
210+ cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm/bin/clang++
211+
212+ - name : Build the Test
213+ working-directory : ./Build
214+ run : |
215+ cmake --build . --config=${{ matrix.build_type }}
216+
217+ - name : Install the Test
218+ working-directory : ./Build
219+ run : |
220+ sudo cmake --install . --config=${{ matrix.build_type }}
221+ sudo chmod +x /Users/runner/work/Json-Performance/Json-Performance/Install/bin/Json-Performance
222+
223+ - name : Run the Test
224+ working-directory : /Users/runner/work/Json-Performance/Json-Performance/Install/bin/
225+ run : |
226+ source /Users/runner/work/Json-Performance/Json-Performance/env/bin/activate
227+ ./Json-Performance
228+ continue-on-error : true
229+
230+ - name : Commit and push the changes to a temp branch.
231+ env :
232+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
233+ working-directory : /Users/runner/work/Json-Performance/Json-Performance/
234+ run : |
235+ sudo git config --global user.email "[email protected] " 236+ sudo git config --global user.name "RealTimeChris"
237+ sudo git checkout -b temp-branch-clang-macos
238+ sudo git add .
239+ sudo git commit -m "Updates - CLANG-MacOS"
240+ sudo git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/RealTimeChris/Json-Performance.git temp-branch-clang-macos
241+
242+ Build-GCC-MacOS :
243+ runs-on : macos-latest
244+
245+ strategy :
246+ fail-fast : false
247+ matrix :
248+ build_type : [Release]
249+
250+ steps :
251+ - uses : actions/checkout@v4
252+
253+ - name : Set up Python
254+ uses : actions/setup-python@v5
255+ with :
256+ python-version : ' 3.x'
257+
258+ - name : Create requirements.txt
259+ run : |
260+ echo seaborn > requirements.txt
261+ echo matplotlib >> requirements.txt
262+ echo pandas >> requirements.txt
263+
264+ - name : Install dependencies
265+ run : |
266+ python -m venv env
267+ source env/bin/activate
268+ pip install -r requirements.txt
269+
270+ - name : Install the latest GCC compiler
271+ run : |
272+ brew install gcc --force-bottle
273+
274+ - name : Determine g++ path
275+ id : gpp_path
276+ run : |
277+ echo "G++ Path: $(which g++)"
278+ echo "GXX_PATH=$(which g++)" >> $GITHUB_ENV
279+
280+ - name : Configure CMake
281+ working-directory : ./
282+ run : |
283+ cmake -S . -B ./Build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCMAKE_CXX_COMPILER=${{env.GXX_PATH}}
284+
285+ - name : Build the Test
286+ working-directory : ./Build
287+ run : |
288+ cmake --build . --config=${{ matrix.build_type }}
289+
290+ - name : Install the Test
291+ working-directory : ./Build
292+ run : |
293+ sudo cmake --install . --config=${{ matrix.build_type }}
294+ sudo chmod +x /Users/runner/work/Json-Performance/Json-Performance/Install/bin/Json-Performance
295+
296+ - name : Run the Test
297+ working-directory : /Users/runner/work/Json-Performance/Json-Performance/Install/bin/
298+ run : |
299+ source /Users/runner/work/Json-Performance/Json-Performance/env/bin/activate
300+ ./Json-Performance
301+ continue-on-error : true
302+
303+ - name : Commit and push the changes to a temp branch.
304+ env :
305+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
306+ working-directory : /Users/runner/work/Json-Performance/Json-Performance/
307+ run : |
308+ sudo git config --global user.email "[email protected] " 309+ sudo git config --global user.name "RealTimeChris"
310+ sudo git checkout -b temp-branch-gcc-macos
311+ sudo git add .
312+ sudo git commit -m "Updates - GCC-MacOS"
313+ sudo git push -f https://${{ secrets.GITHUB_TOKEN }}@github.com/RealTimeChris/Json-Performance.git temp-branch-gcc-macos
314+
315+ Merge-Branches :
316+ runs-on : ubuntu-latest
317+ needs :
318+ - Build-MSVC-Windows
319+ - Build-GCC-Ubuntu
320+ - Build-CLANG-Ubuntu
321+ - Build-CLANG-MacOS
322+ - Build-GCC-MacOS
323+
324+ steps :
325+ - uses : actions/checkout@v4
326+
327+ - name : Merge all temporary branches into the benchmarking branch
328+ env :
329+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
330+ run : |
331+ sudo git config --global user.email "[email protected] " 332+ sudo git config --global user.name "RealTimeChris"
333+ sudo git fetch origin
334+ sudo git checkout benchmarking
335+ sudo git merge origin/temp-branch-msvc-windows --no-ff
336+ sudo git merge origin/temp-branch-gcc-ubuntu --no-ff
337+ sudo git merge origin/temp-branch-clang-ubuntu --no-ff
338+ sudo git merge origin/temp-branch-clang-macos --no-ff
339+ sudo git merge origin/temp-branch-gcc-macos --no-ff
340+ sudo git push origin benchmarking
341+
342+ - name : Delete temporary branches
343+ env :
344+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
345+ run : |
346+ sudo git push origin --delete temp-branch-msvc-windows
347+ sudo git push origin --delete temp-branch-gcc-ubuntu
348+ sudo git push origin --delete temp-branch-clang-ubuntu
349+ sudo git push origin --delete temp-branch-clang-macos
350+ sudo git push origin --delete temp-branch-gcc-macos
0 commit comments