Skip to content

Commit 3f3e98a

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

File tree

6 files changed

+150
-72
lines changed

6 files changed

+150
-72
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
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: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
26+
- name: Cache Cargo registry
27+
uses: actions/cache@v4
28+
with:
29+
path: |
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
target/
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
36+
37+
- name: Cache vcpkg registry
38+
if: always()
39+
uses: actions/cache@v4
40+
with:
41+
path: |
42+
build/vcpkg_installed/
43+
build/vcpkg_packages/
44+
key: ${{ runner.os }}-vcpkg-${{ hashFiles('./vcpkg*.json') }}
45+
restore-keys: |
46+
${{ runner.os }}-vcpkg-
47+
48+
- name: install dependencies
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install -y \
52+
autoconf \
53+
autoconf-archive \
54+
automake \
55+
build-essential \
56+
ninja-build
57+
58+
- name: Install rust dependencies
59+
run: |
60+
cargo install wasm-tools wit-bindgen-cli
61+
62+
- name: configure
63+
run: |
64+
cmake --preset linux-ninja-Release
65+
66+
- name: build
67+
run: |
68+
cmake --build --preset linux-ninja-Release
69+
70+
- name: test
71+
working-directory: build
72+
run: |
73+
ctest -VV
74+
75+
- name: Package
76+
run: |
77+
tar -czvf cmcpp-${GITHUB_REF_NAME}.tar.gz include LICENSE LICENSE-BOOST-PFR
78+
79+
- name: Create Release
80+
uses: ncipollo/release-action@v1
81+
with:
82+
tag: ${{ github.ref_name }}
83+
artifacts: cmcpp-${{ github.ref_name }}.tar.gz
84+
85+
- name: Upload error logs
86+
if: ${{ failure() || cancelled() }}
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: ${{ matrix.os }}-logs
90+
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
6368
6469
- name: configure
6570
run: |

.github/workflows/windows.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,44 @@ 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
55+
- name: install dependencies
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y \
59+
autoconf \
60+
autoconf-archive \
61+
automake \
62+
build-essential \
63+
ninja-build
64+
5265
- name: Install rust dependencies
5366
run: |
54-
cargo install wasm-tools wit-bindgen-cli
67+
cargo install wasm-tools wit-bindgen-cli
5568
5669
- name: configure
5770
run: |

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)