Skip to content

Commit 45e74a4

Browse files
committed
Add github workflows and FUNDING.yml
1 parent 9ddad27 commit 45e74a4

3 files changed

Lines changed: 118 additions & 0 deletions

File tree

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: SlickQuant
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build-and-test:
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest, macos-latest]
17+
build_type: [Release, Debug]
18+
19+
runs-on: ${{ matrix.os }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
# Cache FetchContent downloads and build artifacts so repeated CI runs
25+
# don't re-clone slick-stream-buffer, slick-queue, and googletest each time.
26+
- name: Cache CMake build
27+
uses: actions/cache@v4
28+
with:
29+
path: build/_deps
30+
key: cmake-deps-${{ runner.os }}-${{ hashFiles('CMakeLists.txt', 'tests/CMakeLists.txt') }}
31+
restore-keys: |
32+
cmake-deps-${{ runner.os }}-
33+
34+
- name: Configure CMake
35+
shell: bash
36+
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
37+
38+
- name: Build
39+
run: cmake --build build --config ${{ matrix.build_type }}
40+
41+
- name: Run Tests
42+
working-directory: build
43+
run: ctest -C ${{ matrix.build_type }} --output-on-failure

.github/workflows/release.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on version tags like v0.1.0, v1.0.0, etc.
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create-release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Extract version from tag
19+
id: get_version
20+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
21+
22+
- name: Extract changelog for this version
23+
id: changelog
24+
run: |
25+
if [ -f CHANGELOG.md ]; then
26+
VERSION="${{ github.ref_name }}"
27+
VERSION_ESCAPED=$(echo "$VERSION" | sed 's/\./\\./g')
28+
CHANGES=$(awk "BEGIN{p=0} /^## $VERSION_ESCAPED( |$)/{p=1;next} /^## /{p=0} p" CHANGELOG.md | sed '/^$/d')
29+
30+
if [ -z "$CHANGES" ]; then
31+
echo "CHANGELOG_CONTENT=No changelog entry found for this version." >> $GITHUB_OUTPUT
32+
else
33+
echo "CHANGELOG_CONTENT<<EOF" >> $GITHUB_OUTPUT
34+
echo "$CHANGES" >> $GITHUB_OUTPUT
35+
echo "EOF" >> $GITHUB_OUTPUT
36+
fi
37+
else
38+
echo "CHANGELOG_CONTENT=CHANGELOG.md not found." >> $GITHUB_OUTPUT
39+
fi
40+
41+
- name: Create header archive
42+
run: |
43+
zip -r ./slick-stream-buffer-multiplexer-${{ steps.get_version.outputs.VERSION }}.zip include/
44+
tar -czf ./slick-stream-buffer-multiplexer-${{ steps.get_version.outputs.VERSION }}.tar.gz include/
45+
46+
- name: Create Release
47+
uses: softprops/action-gh-release@v1
48+
with:
49+
name: Release ${{ github.ref_name }}
50+
body: |
51+
## Changes
52+
53+
${{ steps.changelog.outputs.CHANGELOG_CONTENT }}
54+
55+
draft: true
56+
prerelease: false
57+
generate_release_notes: false
58+
files: |
59+
slick-stream-buffer-multiplexer-${{ steps.get_version.outputs.VERSION }}.zip
60+
slick-stream-buffer-multiplexer-${{ steps.get_version.outputs.VERSION }}.tar.gz

0 commit comments

Comments
 (0)