Skip to content

Commit 9c4853b

Browse files
committed
feat: add release support
Signed-off-by: Gordon Smith <[email protected]>
1 parent 2080175 commit 9c4853b

File tree

7 files changed

+155
-73
lines changed

7 files changed

+155
-73
lines changed

.github/workflows/documentation.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/macos.yml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,30 @@ jobs:
2424
fail-fast: false
2525

2626
runs-on: ${{ matrix.os }}
27+
2728
steps:
28-
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
with:
3131
submodules: recursive
3232

3333
- name: Cache Cargo registry
34-
if: always()
35-
uses: actions/cache@v3
34+
uses: actions/cache@v4
3635
with:
37-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('./Cargo.lock') }}
38-
path: ~/.cargo/registry
39-
restore-keys: |
40-
${{ runner.os }}-cargo-registry-
36+
path: |
37+
~/.cargo/bin/
38+
~/.cargo/registry/index/
39+
~/.cargo/registry/cache/
40+
~/.cargo/git/db/
41+
target/
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4143

4244
- name: Cache vcpkg registry
43-
if: always()
44-
uses: actions/cache@v3
45+
uses: actions/cache@v4
4546
with:
47+
path: |
48+
build/vcpkg_installed/
49+
build/vcpkg_packages/
4650
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }}
47-
path: build/vcpkg_installed/**/*
4851
restore-keys: |
4952
${{ runner.os }}-vcpkg-
5053
@@ -54,7 +57,7 @@ jobs:
5457
5558
- name: Install rust dependencies
5659
run: |
57-
cargo install wasm-tools wit-bindgen-cli
60+
cargo install wasm-tools wit-bindgen-cli || true
5861
5962
- name: configure
6063
run: |
@@ -67,7 +70,7 @@ jobs:
6770
- name: test
6871
working-directory: build
6972
run: |
70-
ctest -VV
73+
ctest -VV
7174
7275
- name: Upload error logs
7376
if: ${{ failure() || cancelled() }}

.github/workflows/release.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: C++ Release CI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
env:
9+
CTEST_OUTPUT_ON_FAILURE: 1
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: "ubuntu-24.04"
17+
fail-fast: false
18+
19+
runs-on: ${{ matrix.os }}
20+
21+
permissions:
22+
contents: write
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
submodules: recursive
27+
28+
- name: Cache Cargo registry
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
~/.cargo/bin/
33+
~/.cargo/registry/index/
34+
~/.cargo/registry/cache/
35+
~/.cargo/git/db/
36+
target/
37+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
38+
39+
- name: Cache vcpkg registry
40+
if: always()
41+
uses: actions/cache@v4
42+
with:
43+
path: |
44+
build/vcpkg_installed/
45+
build/vcpkg_packages/
46+
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }}
47+
restore-keys: |
48+
${{ runner.os }}-vcpkg-
49+
50+
- name: install dependencies
51+
run: |
52+
sudo apt-get update
53+
sudo apt-get install -y \
54+
autoconf \
55+
autoconf-archive \
56+
automake \
57+
build-essential \
58+
ninja-build
59+
60+
- name: Install rust dependencies
61+
run: |
62+
cargo install wasm-tools wit-bindgen-cli || true
63+
64+
- name: configure
65+
run: |
66+
cmake --preset linux-ninja-Release
67+
68+
- name: build
69+
run: |
70+
cmake --build --preset linux-ninja-Release
71+
72+
- name: test
73+
working-directory: build
74+
run: |
75+
ctest -VV
76+
77+
- name: Package
78+
run: |
79+
tar -czvf cmcpp-${GITHUB_REF_NAME}.tar.gz include LICENSE LICENSE-BOOST-PFR
80+
81+
- name: Create Release
82+
uses: ncipollo/release-action@v1
83+
with:
84+
tag: ${{ github.ref_name }}
85+
artifacts: cmcpp-${{ github.ref_name }}.tar.gz
86+
87+
- name: Upload error logs
88+
if: ${{ failure() || cancelled() }}
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: ${{ matrix.os }}-logs
92+
path: ./**/*.log

.github/workflows/ubuntu.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,35 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727

2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
with:
3131
submodules: recursive
3232

3333
- name: Cache Cargo registry
34-
if: always()
35-
uses: actions/cache@v3
34+
uses: actions/cache@v4
3635
with:
37-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('./Cargo.lock') }}
38-
path: ~/.cargo/registry
39-
restore-keys: |
40-
${{ runner.os }}-cargo-registry-
36+
path: |
37+
~/.cargo/bin/
38+
~/.cargo/registry/index/
39+
~/.cargo/registry/cache/
40+
~/.cargo/git/db/
41+
target/
42+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4143

4244
- name: Cache vcpkg registry
43-
if: always()
44-
uses: actions/cache@v3
45+
if: always()
46+
uses: actions/cache@v4
4547
with:
48+
path: |
49+
build/vcpkg_installed/
50+
build/vcpkg_packages/
4651
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }}
47-
path: build/vcpkg_installed/**/*
4852
restore-keys: |
4953
${{ runner.os }}-vcpkg-
5054
5155
- name: install dependencies
5256
run: |
57+
sudo apt-get update
5358
sudo apt-get install -y \
5459
autoconf \
5560
autoconf-archive \
@@ -59,7 +64,7 @@ jobs:
5964
6065
- name: Install rust dependencies
6166
run: |
62-
cargo install wasm-tools wit-bindgen-cli
67+
cargo install wasm-tools wit-bindgen-cli || true
6368
6469
- name: configure
6570
run: |

.github/workflows/windows.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,34 @@ jobs:
2727
runs-on: ${{ matrix.os }}
2828

2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
with:
3232
submodules: recursive
3333

3434
- name: Cache Cargo registry
35-
if: always()
36-
uses: actions/cache@v3
35+
uses: actions/cache@v4
3736
with:
38-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('./Cargo.lock') }}
39-
path: ~/.cargo/registry
40-
restore-keys: |
41-
${{ runner.os }}-cargo-registry-
37+
path: |
38+
~/.cargo/bin/
39+
~/.cargo/registry/index/
40+
~/.cargo/registry/cache/
41+
~/.cargo/git/db/
42+
target/
43+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4244

4345
- name: Cache vcpkg registry
44-
if: always()
45-
uses: actions/cache@v3
46+
uses: actions/cache@v4
4647
with:
48+
path: |
49+
build/vcpkg_installed/
50+
build/vcpkg_packages/
4751
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }}
48-
path: build/vcpkg_installed/**/*
4952
restore-keys: |
5053
${{ runner.os }}-vcpkg-
5154
5255
- name: Install rust dependencies
5356
run: |
54-
cargo install wasm-tools wit-bindgen-cli
57+
cargo install wasm-tools wit-bindgen-cli || true
5558
5659
- name: configure
5760
run: |
@@ -64,7 +67,7 @@ jobs:
6467
- name: test
6568
working-directory: build
6669
run: |
67-
ctest -C Debug -VV
70+
ctest -C Debug -VV
6871
6972
- name: Upload error logs
7073
if: ${{ failure() || cancelled() }}

CMakePresets.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@
150150
"name": "linux-ninja-Debug",
151151
"configurePreset": "linux-ninja-Debug"
152152
},
153+
{
154+
"name": "linux-ninja-Release",
155+
"configurePreset": "linux-ninja-Release"
156+
},
157+
{
158+
"name": "linux-ninja-RelWithDebInfo",
159+
"configurePreset": "linux-ninja-RelWithDebInfo"
160+
},
161+
{
162+
"name": "linux-ninja-MinSizeRel",
163+
"configurePreset": "linux-ninja-MinSizeRel"
164+
},
153165
{
154166
"name": "VS-16-Debug",
155167
"configurePreset": "vcpkg-VS-16",

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
This repository contains a C++ ABI implementation of the WebAssembly Component Model.
1414

15+
## Release management
16+
17+
Automated releases are handled by [Release Please](https://github.com/googleapis/release-please) via GitHub Actions. Conventional commit messages (`feat:`, `fix:`, etc.) keep the changelog accurate and drive version bumps; when enough changes accumulate, the workflow opens a release PR that can be merged to publish a GitHub release.
18+
1519
## Features
1620

1721
### OS

0 commit comments

Comments
 (0)