Skip to content

Commit d2a51a3

Browse files
committed
[REL] initial commit
0 parents  commit d2a51a3

40 files changed

+4253
-0
lines changed

.github/workflows/build.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master # adjust if needed
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
check-commit:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
should_run: ${{ steps.check.outputs.run_build }}
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 2
21+
22+
- name: Check commit message for [REL]
23+
id: check
24+
run: |
25+
COMMIT_MSG=$(git log -1 --pretty=format:%s)
26+
if [[ "$COMMIT_MSG" == "[REL]"* ]]; then
27+
echo "run_build=true" >> $GITHUB_ENV
28+
echo "::set-output name=run_build::true"
29+
else
30+
echo "run_build=false" >> $GITHUB_ENV
31+
echo "::set-output name=run_build::false"
32+
fi
33+
34+
- name: Debug Output
35+
run: echo "Run build? ${{ steps.check.outputs.run_build }}"
36+
37+
build:
38+
needs: check-commit
39+
if: needs.check-commit.outputs.should_run == 'true'
40+
runs-on: ubuntu-latest
41+
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Install dependencies (including g++-13)
47+
run: |
48+
sudo apt update
49+
sudo apt install -y software-properties-common
50+
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
51+
sudo apt update
52+
sudo apt install -y g++-13 cmake git libjsoncpp-dev uuid-dev zlib1g-dev libssl-dev
53+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
54+
g++ --version # Verify installation
55+
56+
- name: Install Drogon
57+
run: |
58+
git clone --branch v1.9.9 --depth 1 https://github.com/drogonframework/drogon.git
59+
cd drogon
60+
git submodule update --init
61+
mkdir build && cd build
62+
cmake .. -DCMAKE_CXX_STANDARD=20
63+
make -j$(nproc)
64+
sudo make install
65+
66+
- name: Get latest commit hash
67+
id: vars
68+
run: echo "GIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
69+
70+
- name: Build the project with g++-13
71+
run: |
72+
mkdir -p build
73+
cd build
74+
cmake ..
75+
make -j$(nproc)
76+
77+
- name: Package artifact
78+
run: |
79+
mkdir -p release
80+
cp build/dv3 release/
81+
tar -czf release.tar.gz -C release .
82+
83+
- name: Create Release
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
tag_name: release-${{ env.GIT_HASH }}
87+
name: Release ${{ env.GIT_HASH }}
88+
body: "Automated release for commit ${{ env.GIT_HASH }}"
89+
draft: false
90+
prerelease: false
91+
files: release.tar.gz
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,clion+all,visualstudiocode,cmake,c++
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,clion+all,visualstudiocode,cmake,c++
3+
4+
### C++ ###
5+
# Prerequisites
6+
*.d
7+
8+
# Compiled Object files
9+
*.slo
10+
*.lo
11+
*.o
12+
*.obj
13+
14+
# Precompiled Headers
15+
*.gch
16+
*.pch
17+
18+
# Compiled Dynamic libraries
19+
*.so
20+
*.dylib
21+
*.dll
22+
23+
# Fortran module files
24+
*.mod
25+
*.smod
26+
27+
# Compiled Static libraries
28+
*.lai
29+
*.la
30+
*.a
31+
*.lib
32+
33+
# Executables
34+
*.exe
35+
*.out
36+
*.app
37+
38+
### CLion+all ###
39+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
40+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
41+
42+
# User-specific stuff
43+
.idea/**/workspace.xml
44+
.idea/**/tasks.xml
45+
.idea/**/usage.statistics.xml
46+
.idea/**/dictionaries
47+
.idea/**/shelf
48+
49+
# AWS User-specific
50+
.idea/**/aws.xml
51+
52+
# Generated files
53+
.idea/**/contentModel.xml
54+
55+
# Sensitive or high-churn files
56+
.idea/**/dataSources/
57+
.idea/**/dataSources.ids
58+
.idea/**/dataSources.local.xml
59+
.idea/**/sqlDataSources.xml
60+
.idea/**/dynamic.xml
61+
.idea/**/uiDesigner.xml
62+
.idea/**/dbnavigator.xml
63+
64+
# Gradle
65+
.idea/**/gradle.xml
66+
.idea/**/libraries
67+
68+
# Gradle and Maven with auto-import
69+
# When using Gradle or Maven with auto-import, you should exclude module files,
70+
# since they will be recreated, and may cause churn. Uncomment if using
71+
# auto-import.
72+
# .idea/artifacts
73+
# .idea/compiler.xml
74+
# .idea/jarRepositories.xml
75+
# .idea/modules.xml
76+
# .idea/*.iml
77+
# .idea/modules
78+
# *.iml
79+
# *.ipr
80+
81+
# CMake
82+
cmake-build-*/
83+
84+
# Mongo Explorer plugin
85+
.idea/**/mongoSettings.xml
86+
87+
# File-based project format
88+
*.iws
89+
90+
# IntelliJ
91+
out/
92+
93+
# mpeltonen/sbt-idea plugin
94+
.idea_modules/
95+
96+
# JIRA plugin
97+
atlassian-ide-plugin.xml
98+
99+
# Cursive Clojure plugin
100+
.idea/replstate.xml
101+
102+
# SonarLint plugin
103+
.idea/sonarlint/
104+
105+
# Crashlytics plugin (for Android Studio and IntelliJ)
106+
com_crashlytics_export_strings.xml
107+
crashlytics.properties
108+
crashlytics-build.properties
109+
fabric.properties
110+
111+
# Editor-based Rest Client
112+
.idea/httpRequests
113+
114+
# Android studio 3.1+ serialized cache file
115+
.idea/caches/build_file_checksums.ser
116+
117+
### CLion+all Patch ###
118+
# Ignore everything but code style settings and run configurations
119+
# that are supposed to be shared within teams.
120+
121+
.idea/*
122+
123+
!.idea/codeStyles
124+
!.idea/runConfigurations
125+
126+
### CMake ###
127+
CMakeLists.txt.user
128+
CMakeCache.txt
129+
CMakeFiles
130+
CMakeScripts
131+
Testing
132+
Makefile
133+
cmake_install.cmake
134+
install_manifest.txt
135+
compile_commands.json
136+
CTestTestfile.cmake
137+
_deps
138+
139+
### CMake Patch ###
140+
CMakeUserPresets.json
141+
142+
# External projects
143+
*-prefix/
144+
145+
### Linux ###
146+
*~
147+
148+
# temporary files which can be created if a process still has a handle open of a deleted file
149+
.fuse_hidden*
150+
151+
# KDE directory preferences
152+
.directory
153+
154+
# Linux trash folder which might appear on any partition or disk
155+
.Trash-*
156+
157+
# .nfs files are created when an open file is removed but is still being accessed
158+
.nfs*
159+
160+
### macOS ###
161+
# General
162+
.DS_Store
163+
.AppleDouble
164+
.LSOverride
165+
166+
# Icon must end with two \r
167+
Icon
168+
169+
170+
# Thumbnails
171+
._*
172+
173+
# Files that might appear in the root of a volume
174+
.DocumentRevisions-V100
175+
.fseventsd
176+
.Spotlight-V100
177+
.TemporaryItems
178+
.Trashes
179+
.VolumeIcon.icns
180+
.com.apple.timemachine.donotpresent
181+
182+
# Directories potentially created on remote AFP share
183+
.AppleDB
184+
.AppleDesktop
185+
Network Trash Folder
186+
Temporary Items
187+
.apdisk
188+
189+
### macOS Patch ###
190+
# iCloud generated files
191+
*.icloud
192+
193+
### VisualStudioCode ###
194+
.vscode/*
195+
!.vscode/settings.json
196+
!.vscode/tasks.json
197+
!.vscode/launch.json
198+
!.vscode/extensions.json
199+
!.vscode/*.code-snippets
200+
201+
# Local History for Visual Studio Code
202+
.history/
203+
204+
# Built Visual Studio Code Extensions
205+
*.vsix
206+
207+
### VisualStudioCode Patch ###
208+
# Ignore all local history of files
209+
.history
210+
.ionide
211+
212+
### Windows ###
213+
# Windows thumbnail cache files
214+
Thumbs.db
215+
Thumbs.db:encryptable
216+
ehthumbs.db
217+
ehthumbs_vista.db
218+
219+
# Dump file
220+
*.stackdump
221+
222+
# Folder config file
223+
[Dd]esktop.ini
224+
225+
# Recycle Bin used on file shares
226+
$RECYCLE.BIN/
227+
228+
# Windows Installer files
229+
*.cab
230+
*.msi
231+
*.msix
232+
*.msm
233+
*.msp
234+
235+
# Windows shortcuts
236+
*.lnk
237+
238+
# End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,clion+all,visualstudiocode,cmake,c++

0 commit comments

Comments
 (0)