-
Notifications
You must be signed in to change notification settings - Fork 0
132 lines (103 loc) · 3.86 KB
/
release.yml
File metadata and controls
132 lines (103 loc) · 3.86 KB
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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Extract version from tag
id: version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Extract changelog for version
id: changelog
run: |
VERSION=${{ steps.version.outputs.VERSION }}
# Extract changelog section for this version
if grep -q "## \[${VERSION}\]" CHANGELOG.md; then
CHANGELOG=$(awk "/## \[${VERSION}\]/{flag=1; next} /## \[/{flag=0} flag" CHANGELOG.md)
else
CHANGELOG="See [CHANGELOG](CHANGELOG.md) for details."
fi
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: TensorCraft-HPC v${{ steps.version.outputs.VERSION }}
body: |
## What's Changed | 更新内容
${{ steps.changelog.outputs.CHANGELOG }}
---
## Installation | 安装
See [Installation Guide](https://lessup.github.io/modern-ai-kernels/en/getting-started/installation.html) for detailed installation instructions.
详见 [安装指南](https://lessup.github.io/modern-ai-kernels/zh/getting-started/installation.html)。
---
## Quick Start | 快速开始
```bash
# Clone repository | 克隆仓库
git clone https://github.com/LessUp/modern-ai-kernels.git
cd modern-ai-kernels
# Configure and build | 配置并构建
cmake --preset dev
cmake --build --preset dev --parallel $(nproc)
# Run tests | 运行测试
ctest --preset dev --output-on-failure
# Install Python bindings | 安装 Python 绑定
python -m pip install -e .
```
---
## Full Changelog | 完整变更日志
See [CHANGELOG.md](CHANGELOG.md) for the complete changelog.
完整变更日志请见 [CHANGELOG.md](CHANGELOG.md)。
draft: false
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-release:
name: Build Release Artifacts
runs-on: ubuntu-latest
needs: release
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
container:
image: nvidia/cuda:12.8.0-devel-ubuntu22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y cmake ninja-build git zip
- name: Configure
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_ARCHITECTURES="70;75;80;86;89;90"
- name: Build
run: cmake --build build --parallel
- name: Package headers
run: |
mkdir -p tensorcraft-hpc-${{ github.ref_name }}
cp -r include tensorcraft-hpc-${{ github.ref_name }}/
cp LICENSE README.md CHANGELOG.md tensorcraft-hpc-${{ github.ref_name }}/
zip -r tensorcraft-hpc-${{ github.ref_name }}-headers.zip tensorcraft-hpc-${{ github.ref_name }}
- name: Upload Release Assets
uses: softprops/action-gh-release@v2
with:
files: |
tensorcraft-hpc-${{ github.ref_name }}-headers.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}