Skip to content

Commit 164655b

Browse files
committed
Merge branch 'main' into autobuild
2 parents c3c1a6a + d1c4176 commit 164655b

File tree

84 files changed

+3969
-8172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+3969
-8172
lines changed

.github/workflows/ci.yml

Lines changed: 416 additions & 0 deletions
Large diffs are not rendered by default.

.github/workflows/prerelease.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Pre-release
2+
3+
on:
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
8+
branches:
9+
- main
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
create-prerelease:
16+
runs-on: ubuntu-latest
17+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Get commit info
25+
id: commit
26+
run: |
27+
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
28+
echo "date=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
29+
echo "commit_msg=$(git log -1 --pretty=%B | head -n 1)" >> $GITHUB_OUTPUT
30+
31+
- name: Download all artifacts
32+
uses: actions/download-artifact@v4
33+
with:
34+
path: artifacts
35+
run-id: ${{ github.event.workflow_run.id }}
36+
github-token: ${{ github.token }}
37+
38+
- name: Create artifact archives
39+
run: |
40+
cd artifacts
41+
for dir in */; do
42+
dirname="${dir%/}"
43+
tar -czf "${dirname}.tar.gz" -C "$dirname" .
44+
zip -r "${dirname}.zip" "$dirname"
45+
done
46+
cd ..
47+
48+
- name: Delete existing pre-release
49+
run: |
50+
gh release delete latest --yes || true
51+
git push origin :refs/tags/latest || true
52+
env:
53+
GH_TOKEN: ${{ github.token }}
54+
55+
- name: Create pre-release
56+
uses: softprops/action-gh-release@v2
57+
with:
58+
tag_name: latest
59+
name: "Development Build (latest)"
60+
body: |
61+
## 🚀 Automated Development Build
62+
63+
**This is an automatic pre-release from the latest main branch.**
64+
65+
- **Commit**: ${{ steps.commit.outputs.sha_short }}
66+
- **Date**: ${{ steps.commit.outputs.date }}
67+
- **Message**: ${{ steps.commit.outputs.commit_msg }}
68+
69+
### 📦 Available Builds
70+
71+
- **Linux GCC 14**: `EntropyCore-Linux-gcc-14.tar.gz` / `.zip`
72+
- **macOS Universal**: `EntropyCore-macOS-universal.tar.gz` / `.zip` (Intel + Apple Silicon)
73+
- **Windows x64**: `EntropyCore-Windows-x64.tar.gz` / `.zip`
74+
75+
Each archive contains:
76+
- **lib/**: Static library (`libEntropyCore.a` or `EntropyCore.lib`)
77+
- **include/**: All C++ and C headers
78+
- **lib/cmake/EntropyCore/**: CMake config files for easy integration
79+
80+
### ⚠️ Warning
81+
This is a development build and may be unstable. For production use, please use a [stable release](https://github.com/${{ github.repository }}/releases).
82+
83+
### 📋 Recent Changes
84+
See [commit history](https://github.com/${{ github.repository }}/commits/main) for details.
85+
files: |
86+
artifacts/*.tar.gz
87+
artifacts/*.zip
88+
prerelease: true
89+
make_latest: false

.github/workflows/release.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
# First, trigger builds for all platforms
13+
build:
14+
uses: ./.github/workflows/ci.yml
15+
16+
create-release:
17+
needs: build
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Verify tag format
26+
run: |
27+
if [[ ! "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
28+
echo "Error: Tag must be in format v*.*.* (e.g., v1.0.0)"
29+
exit 1
30+
fi
31+
32+
- name: Extract version info
33+
id: version
34+
run: |
35+
VERSION="${{ github.ref_name }}"
36+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
37+
echo "version_number=${VERSION#v}" >> $GITHUB_OUTPUT
38+
39+
- name: Download all artifacts
40+
uses: actions/download-artifact@v4
41+
with:
42+
path: artifacts
43+
44+
- name: Create artifact archives
45+
run: |
46+
cd artifacts
47+
for dir in */; do
48+
dirname="${dir%/}"
49+
tar -czf "${dirname}.tar.gz" -C "$dirname" .
50+
zip -r "${dirname}.zip" "$dirname"
51+
done
52+
cd ..
53+
54+
- name: Generate release notes
55+
id: notes
56+
run: |
57+
# Get the previous tag
58+
PREV_TAG=$(git describe --tags --abbrev=0 ${{ github.ref_name }}^ 2>/dev/null || echo "")
59+
60+
if [ -z "$PREV_TAG" ]; then
61+
echo "This is the first release"
62+
CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${{ github.ref_name }})
63+
else
64+
echo "Changes since $PREV_TAG"
65+
CHANGELOG=$(git log --pretty=format:"- %s (%h)" ${PREV_TAG}..${{ github.ref_name }})
66+
fi
67+
68+
# Save to file to handle multiline
69+
cat > release_notes.md << 'EOF'
70+
## 📦 Release ${{ steps.version.outputs.version }}
71+
72+
### Changes in this release
73+
74+
$CHANGELOG
75+
76+
### 📦 Pre-built Binaries
77+
78+
Download the appropriate archive for your platform:
79+
80+
- **Linux GCC 14**: `EntropyCore-Linux-gcc-14.tar.gz` / `.zip`
81+
- **macOS Universal**: `EntropyCore-macOS-universal.tar.gz` / `.zip` (Intel + Apple Silicon)
82+
- **Windows x64**: `EntropyCore-Windows-x64.tar.gz` / `.zip`
83+
84+
Each archive contains:
85+
- **lib/**: Static library (`libEntropyCore.a` or `EntropyCore.lib`)
86+
- **include/**: All C++ and C headers
87+
- **lib/cmake/EntropyCore/**: CMake config files
88+
89+
Extract and use in your project:
90+
```cmake
91+
find_package(EntropyCore REQUIRED PATHS /path/to/extracted/lib/cmake/EntropyCore)
92+
target_link_libraries(YourTarget PRIVATE EntropyCore::Core)
93+
```
94+
95+
### 🔧 Building from Source
96+
97+
```bash
98+
# Clone the repository
99+
git clone https://github.com/${{ github.repository }}.git
100+
cd EntropyCore
101+
git checkout ${{ github.ref_name }}
102+
103+
# Basic build (minimal dependencies)
104+
cmake -B build -S .
105+
cmake --build build
106+
107+
# With Tracy profiler
108+
cmake -B build -S . -DENTROPY_WITH_TRACY=ON -DVCPKG_MANIFEST_FEATURES=tracy
109+
110+
# With tests
111+
cmake -B build -S . -DENTROPY_BUILD_TESTS=ON -DVCPKG_MANIFEST_FEATURES=tests
112+
```
113+
114+
### 📚 Documentation
115+
116+
See [README.md](https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}/README.md) for complete documentation.
117+
118+
### 🐛 Reporting Issues
119+
120+
Found a bug? [Open an issue](https://github.com/${{ github.repository }}/issues/new)
121+
EOF
122+
123+
- name: Create Release
124+
uses: softprops/action-gh-release@v2
125+
with:
126+
name: "Release ${{ steps.version.outputs.version }}"
127+
body_path: release_notes.md
128+
files: |
129+
artifacts/*.tar.gz
130+
artifacts/*.zip
131+
draft: false
132+
prerelease: false
133+
make_latest: true
134+
generate_release_notes: true
135+
136+
- name: Announce release
137+
run: |
138+
echo "✅ Release ${{ steps.version.outputs.version }} created successfully!"
139+
echo "🔗 View at: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}"

0 commit comments

Comments
 (0)