Skip to content

Commit 7201df2

Browse files
committed
Initial commit
0 parents  commit 7201df2

22 files changed

Lines changed: 4393 additions & 0 deletions

.github/workflows/pr.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Pull Request Tests
3+
on:
4+
pull_request:
5+
branches:
6+
- "master"
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
format:
14+
runs-on: "ubuntu-latest"
15+
steps:
16+
- uses: actions/checkout@v6
17+
- name: Run clang-format
18+
run: |
19+
sudo apt update
20+
sudo apt install clang-format-20 -y
21+
cd BOF-Collection
22+
find . -maxdepth 1 -type f -name "*.cpp" | while read f; do clang-format-20 --Werror --dry-run "${f}"; done
23+
build:
24+
needs: [format]
25+
runs-on: "windows-latest"
26+
steps:
27+
- uses: actions/checkout@v6
28+
29+
- uses: microsoft/setup-msbuild@v2
30+
with:
31+
msbuild-architecture: x86
32+
33+
- name: Build x86
34+
run: |
35+
msbuild /p:Configuration=Release /p:Platform=x86
36+
37+
- uses: microsoft/setup-msbuild@v2
38+
with:
39+
msbuild-architecture: x64
40+
41+
- name: Build x64
42+
run: |
43+
msbuild /p:Configuration=Release /p:Platform=x64
44+
45+
- name: Stage
46+
run: |
47+
mkdir stage
48+
cp C2/* stage
49+
cp x64/Release/*.x64.o stage
50+
cp Release/*.x86.o stage
51+
52+
- name: Upload artefacts
53+
uses: actions/upload-artifact@v6
54+
with:
55+
path: stage/

.github/workflows/release.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Build artefacts and create release
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- "README.md"
9+
10+
jobs:
11+
create-release:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
attestations: write
15+
contents: write
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v6
20+
# Why am I doing this instead of just rebuilding?
21+
- name: Create release
22+
run: |
23+
mkdir artefacts
24+
cd artefacts
25+
26+
# Get the last merged PR
27+
export PR_NUMBER=$(gh pr list --state merged --limit 1 --json number --jq '.[].number')
28+
if [[ -z "${PR_NUMBER}" ]]; then
29+
echo "No PR number found."
30+
exit 1
31+
fi
32+
33+
# Parse the workflow ID from the PR check link
34+
export WORKFLOW_ID=$(gh pr checks "${PR_NUMBER}" --json link --jq '.[].link' | head -n1 | awk -F '/' '{print $8}')
35+
36+
if [[ -z "${WORKFLOW_ID}" ]]; then
37+
echo "No workflow ID found."
38+
exit 1
39+
fi
40+
41+
# Download artefacts
42+
echo "Downloading artefacts from workflow ${WORKFLOW_ID}"
43+
gh run download "${WORKFLOW_ID}"
44+
cd artifact
45+
46+
export DATE=$(date +"%Y%m%d")
47+
48+
zip "BOF-Collection-v${DATE}.zip" ./*
49+
gh release create "v${DATE}" --generate-notes --fail-on-no-commits --latest --target master "BOF-Collection-v${DATE}.zip"

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# User-specific files
2+
*.rsuser
3+
*.suo
4+
*.user
5+
*.userosscache
6+
*.sln.docstates
7+
*.env
8+
9+
.vs/
10+
Debug/
11+
Release/
12+
x64/
13+
Packages/

BOF-Collection.sln

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.14.36811.4 d17.14
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BOF-Collection", "BOF-Collection\BOF-Collection.vcxproj", "{63ED8CDC-2F73-49A2-A286-BCDFE387E251}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
UnitTest|x64 = UnitTest|x64
15+
UnitTest|x86 = UnitTest|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Debug|x64.ActiveCfg = Debug|x64
19+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Debug|x64.Build.0 = Debug|x64
20+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Debug|x86.ActiveCfg = Debug|Win32
21+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Debug|x86.Build.0 = Debug|Win32
22+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Release|x64.ActiveCfg = Release|x64
23+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Release|x64.Build.0 = Release|x64
24+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Release|x86.ActiveCfg = Release|Win32
25+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.Release|x86.Build.0 = Release|Win32
26+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.UnitTest|x64.ActiveCfg = UnitTest|x64
27+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.UnitTest|x64.Build.0 = UnitTest|x64
28+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.UnitTest|x86.ActiveCfg = UnitTest|Win32
29+
{63ED8CDC-2F73-49A2-A286-BCDFE387E251}.UnitTest|x86.Build.0 = UnitTest|Win32
30+
EndGlobalSection
31+
GlobalSection(SolutionProperties) = preSolution
32+
HideSolutionNode = FALSE
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {A28ECA0F-BB43-4C2B-8FAF-6355318B757D}
36+
EndGlobalSection
37+
EndGlobal

BOF-Collection/.clang-format

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
Language: Cpp
3+
BasedOnStyle: LLVM
4+
ColumnLimit: 120
5+
6+
IndentWidth: 4
7+
UseTab: Never
8+
IndentExternBlock: false
9+
SortIncludes: false
10+
PointerAlignment: Left
11+
BinPackArguments: false
12+
BinPackParameters: false
13+
AlignAfterOpenBracket: BlockIndent
14+
AllowShortFunctionsOnASingleLine: Empty
15+
AllowAllArgumentsOnNextLine: false
16+
PenaltyBreakBeforeFirstCallParameter: 0
17+
...
18+

0 commit comments

Comments
 (0)