Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ jobs:
strategy:
fail-fast: false
matrix:
backend: [nvidia, metax]
backend: [nvidia, metax, ascend]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Sync changelog
run: python3 packaging/sync-changelog.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build RPM Packages

on:
push:
tags:
- 'v*'
pull_request:
branches: [ main ]
paths:
- 'flagcx/**'
- 'packaging/rpm/**'
- '.github/workflows/build-rpm.yml'
workflow_dispatch:

jobs:
build-rpm-packages:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
backend: [nvidia, ascend]
# metax requires custom base image setup

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Sync changelog
run: python3 packaging/sync-changelog.py

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build ${{ matrix.backend }} RPM packages
run: ./packaging/rpm/build-flagcx-rpm.sh ${{ matrix.backend }}

- name: Upload ${{ matrix.backend }} RPM packages
uses: actions/upload-artifact@v4
with:
name: flagcx-${{ matrix.backend }}-rpm-packages
path: rpm-packages/${{ matrix.backend }}/**/*.rpm
retention-days: 7
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build
plugin/*/build
test/*/build
debian-packages
rpm-packages

# Ignore compiled Python files and shared object files
plugin/*/*.so
Expand Down
74 changes: 74 additions & 0 deletions packaging/CHANGELOG-MANAGEMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Changelog Management

This document describes how to manage changelogs for FlagCX packages.

## Overview

FlagCX uses `docs/CHANGELOG.md` as the single source of truth for release history. This changelog is automatically converted to both Debian and RPM formats during the build process.

## Files

- `docs/CHANGELOG.md` - Single source of truth for project release history
- `packaging/sync-changelog.py` - Converts docs/CHANGELOG.md to Debian and RPM formats

## Workflow

### Updating Changelogs

1. Edit `docs/CHANGELOG.md` following the existing format
2. Run the sync script to update package-specific changelogs:
```bash
python3 packaging/sync-changelog.py
```
3. The script will update:
- `packaging/debian/changelog` (Debian format)
- `packaging/rpm/specs/flagcx.spec` (%changelog section)

## Build Integration

The changelog sync is automatically run during package builds:

- **CI/CD**: Both `.github/workflows/build-deb.yml` and `build-rpm.yml` run the sync script
- **Local builds**: Both `build-flagcx.sh` and `build-flagcx-rpm.sh` run the sync script

## Changelog Format

### docs/CHANGELOG.md (Source Format)

```markdown
## Release History

- **[2025/11]** Released [v0.7](https://github.com/flagos-ai/FlagCX/releases/tag/v0.7.0):

- Added support to TsingMicro, including device adaptor `tsmicroAdaptor` and CCL adaptor `tcclAdaptor`.
- Implemented an experimental kernel-free non-reduce collective communication
(*SendRecv*, *AlltoAll*, *AlltoAllv*, *Broadcast*, *Gather*, *Scatter*, *AllGather*)
using device-buffer IPC/RDMA.
```

### Debian Format (auto-generated)

```
flagcx (0.7-1) unstable; urgency=medium

* Added support to TsingMicro, including device adaptor tsmicroAdaptor and CCL adaptor tcclAdaptor.
* Implemented an experimental kernel-free non-reduce collective communication (SendRecv, AlltoAll, AlltoAllv, Broadcast, Gather, Scatter, AllGather) using device-buffer IPC/RDMA.

-- FlagOS Contributors <contact@flagos.io> Sat, 01 Nov 2025 10:00:00 +0800
```

### RPM Format (auto-generated)

```
* Sat Nov 01 2025 FlagOS Contributors <contact@flagos.io> - 0.7-1
- Added support to TsingMicro, including device adaptor tsmicroAdaptor and CCL adaptor tcclAdaptor.
- Implemented an experimental kernel-free non-reduce collective communication (SendRecv, AlltoAll, AlltoAllv, Broadcast, Gather, Scatter, AllGather) using device-buffer IPC/RDMA.
```

## Best Practices

1. Always edit `docs/CHANGELOG.md` directly, never edit the generated files
2. Run `sync-changelog.py` after updating `docs/CHANGELOG.md`
3. Follow the existing format for consistency
4. Use clear, descriptive changelog entries
5. Multi-line entries are supported - just indent continuation lines with 4 spaces
Loading