Skip to content

Commit 2409755

Browse files
committed
WIP
1 parent 0ccd813 commit 2409755

File tree

2 files changed

+42
-122
lines changed

2 files changed

+42
-122
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
tags:
66
- "ccf-[56].*"
77
workflow_dispatch:
8+
pull_request:
89

910
permissions:
1011
contents: write
@@ -38,46 +39,39 @@ jobs:
3839
name: sbom
3940
path: _manifest/spdx_2.2/*
4041

41-
release_notes:
42-
name: Release Notes
43-
runs-on: ubuntu-latest
44-
steps:
45-
- uses: actions/checkout@v4
46-
with:
47-
fetch-depth: 1
48-
- name: "Check Release Notes"
49-
run: |
50-
set -ex
51-
python scripts/extract-release-notes.py --target-git-version
52-
shell: bash
53-
- name: "Produce Release Notes"
54-
run: |
55-
set -ex
56-
set -o pipefail
57-
python ./scripts/extract-release-notes.py --target-git-version --describe-path-changes "./samples/constitution" | tee rel-notes.md
58-
- name: "Upload .deb Package"
59-
uses: actions/upload-artifact@v4
60-
with:
61-
name: relnotes
62-
path: rel-notes.md
42+
# release_notes:
43+
# name: Release Notes
44+
# runs-on: ubuntu-latest
45+
# steps:
46+
# - uses: actions/checkout@v4
47+
# with:
48+
# fetch-depth: 1
49+
# - name: "Check Release Notes"
50+
# run: |
51+
# set -ex
52+
# python scripts/extract-release-notes.py --target-git-version
53+
# shell: bash
54+
# - name: "Produce Release Notes"
55+
# run: |
56+
# set -ex
57+
# set -o pipefail
58+
# python ./scripts/extract-release-notes.py --target-git-version --describe-path-changes "./samples/constitution" | tee rel-notes.md
59+
# - name: "Upload Release Notes"
60+
# uses: actions/upload-artifact@v4
61+
# with:
62+
# name: relnotes
63+
# path: rel-notes.md
6364

6465
build_release:
6566
name: Build Release
66-
needs: release_notes
67+
# needs: release_notes
6768
strategy:
6869
matrix:
6970
platform:
70-
- name: virtual
71-
os: ubuntu
72-
image: ghcr.io/microsoft/ccf/ci/default:build-14-01-2025
73-
test_filter: "benchmark|unit"
74-
- name: snp
75-
os: ubuntu
76-
image: ghcr.io/microsoft/ccf/ci/default:build-14-01-2025
7771
- name: virtual
7872
os: azure-linux
7973
image: mcr.microsoft.com/azurelinux/base/core:3.0
80-
test_filter: "benchmark|unit|lts"
74+
test_filter: "benchmark|unit"
8175
- name: snp
8276
os: azure-linux
8377
image: mcr.microsoft.com/azurelinux/base/core:3.0
@@ -89,7 +83,6 @@ jobs:
8983

9084
steps:
9185
- name: "Checkout dependencies"
92-
if: ${{ matrix.platform.os == 'azure-linux' }}
9386
shell: bash
9487
run: |
9588
gpg --import /etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
@@ -101,7 +94,6 @@ jobs:
10194
fetch-depth: 0
10295

10396
- name: "Install dependencies"
104-
if: ${{ matrix.platform.os == 'azure-linux' }}
10597
shell: bash
10698
run: |
10799
set -ex
@@ -117,16 +109,6 @@ jobs:
117109
cmake -GNinja -DCOMPILE_TARGET=${{ matrix.platform.name }} -DCLIENT_PROTOCOLS_TEST=ON -DCMAKE_BUILD_TYPE=Release ..
118110
ninja -v | tee build.log
119111
120-
- name: "Install Extended Testing Tools"
121-
if: ${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}
122-
run: |
123-
set -ex
124-
sudo apt-get -y update
125-
sudo apt install ansible -y
126-
cd getting_started/setup_vm
127-
ansible-playbook ccf-extended-testing.yml
128-
shell: bash
129-
130112
- name: "Test ${{ matrix.platform.name }}"
131113
if: "${{ matrix.platform.name == 'virtual' }}"
132114
run: |
@@ -143,37 +125,19 @@ jobs:
143125
./tests.sh --timeout 360 --output-on-failure -LE "suite|${{ matrix.platform.test_filter }}"
144126
shell: bash
145127

146-
- name: "Upload logs for ${{ matrix.platform.os }}-${{ matrix.platform.name }}"
128+
- name: "Upload logs for ${{ matrix.platform.name }}"
147129
if: success() || failure()
148130
uses: actions/upload-artifact@v4
149131
with:
150-
name: logs-${{ matrix.platform.os }}-${{ matrix.platform.name }}
132+
name: logs-${{ matrix.platform.name }}
151133
path: |
152134
build/workspace/*/*.config.json
153135
build/workspace/*/out
154136
build/workspace/*/err
155137
build/workspace/*.ledger/*
156138
if-no-files-found: ignore
157139

158-
- name: "Make .deb Package"
159-
if: "${{ matrix.platform.os == 'ubuntu' }}"
160-
id: make_deb
161-
run: |
162-
set -ex
163-
set -o pipefail
164-
cd build
165-
cmake -L .. 2>/dev/null | grep CMAKE_INSTALL_PREFIX: | cut -d = -f 2 > /tmp/install_prefix
166-
cpack -V -G DEB
167-
INITIAL_PKG=`ls *.deb`
168-
CCF_GITHUB_PKG=${INITIAL_PKG//\~/_}
169-
if [[ "$INITIAL_PKG" != "$CCF_GITHUB_PKG" ]]; then
170-
mv $INITIAL_PKG $CCF_GITHUB_PKG
171-
fi
172-
echo "name=$CCF_GITHUB_PKG" >> $GITHUB_OUTPUT
173-
shell: bash
174-
175140
- name: "Make .rpm (devel) Package"
176-
if: "${{ matrix.platform.os == 'azure-linux' }}"
177141
id: make_rpm_devel
178142
run: |
179143
set -ex
@@ -190,7 +154,6 @@ jobs:
190154
shell: bash
191155

192156
- name: "Make .rpm (run) Package"
193-
if: "${{ matrix.platform.os == 'azure-linux' }}"
194157
id: make_rpm_run
195158
run: |
196159
set -ex
@@ -211,16 +174,7 @@ jobs:
211174
echo "name=$CCF_GITHUB_PKG" >> $GITHUB_OUTPUT
212175
shell: bash
213176

214-
- name: "Install CCF Debian package"
215-
if: "${{ matrix.platform.os == 'ubuntu' }}"
216-
run: |
217-
set -ex
218-
cd build
219-
sudo apt -y install ./${{ steps.make_deb.outputs.name }}
220-
shell: bash
221-
222-
- name: "Install CCF RPM package"
223-
if: "${{ matrix.platform.os == 'azure-linux' }}"
177+
- name: "Install CCF package"
224178
run: |
225179
set -ex
226180
cd build
@@ -251,43 +205,34 @@ jobs:
251205
./tests/test_install_build.sh -DCOMPILE_TARGET=${{ matrix.platform.name }}
252206
shell: bash
253207

254-
- name: "Upload .deb Package"
255-
if: "${{ matrix.platform.os == 'ubuntu' }}"
256-
uses: actions/upload-artifact@v4
257-
with:
258-
name: pkg-${{ matrix.platform.os }}-${{ matrix.platform.name }}
259-
path: build/${{ steps.make_deb.outputs.name }}
260-
261208
- name: "Upload .rpm Package"
262-
if: "${{ matrix.platform.os == 'azure-linux' }}"
263209
uses: actions/upload-artifact@v4
264210
with:
265-
name: pkg-${{ matrix.platform.os }}-${{ matrix.platform.name }}
211+
name: pkg-${{ matrix.platform.name }}
266212
path: build/${{ steps.make_rpm_run.outputs.name }}
267213

268214
- name: "Upload -devel.rpm Package"
269-
if: "${{ matrix.platform.os == 'azure-linux' }}"
270215
uses: actions/upload-artifact@v4
271216
with:
272-
name: pkg-${{ matrix.platform.os }}-${{ matrix.platform.name }}-devel
217+
name: pkg-${{ matrix.platform.name }}-devel
273218
path: build/${{ steps.make_rpm_devel.outputs.name }}
274219

275220
- name: "Upload Compatibility Report"
276-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
221+
if: "${{ matrix.platform.name == 'virtual' }}"
277222
uses: actions/upload-artifact@v4
278223
with:
279224
name: compatibility
280225
path: build/compatibility_report.json
281226

282227
- name: "Upload TLS Report"
283-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
228+
if: "${{ matrix.platform.name == 'virtual' }}"
284229
uses: actions/upload-artifact@v4
285230
with:
286231
name: tls
287232
path: build/tls_report.html
288233

289234
- name: "Build Python Wheel"
290-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
235+
if: "${{ matrix.platform.name == 'virtual' }}"
291236
id: build_wheel
292237
run: |
293238
set -ex
@@ -301,14 +246,14 @@ jobs:
301246
shell: bash
302247

303248
- name: "Upload Python Wheel"
304-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
249+
if: "${{ matrix.platform.name == 'virtual' }}"
305250
uses: actions/upload-artifact@v4
306251
with:
307252
name: wheel
308253
path: python/${{ steps.build_wheel.outputs.name }}
309254

310255
- name: "Build TS Package"
311-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
256+
if: "${{ matrix.platform.name == 'virtual' }}"
312257
id: build_tstgz
313258
run: |
314259
set -ex
@@ -323,7 +268,7 @@ jobs:
323268
shell: bash
324269

325270
- name: "Upload TS Package"
326-
if: "${{ matrix.platform.os == 'ubuntu' && matrix.platform.name == 'virtual' }}"
271+
if: "${{ matrix.platform.name == 'virtual' }}"
327272
uses: actions/upload-artifact@v4
328273
with:
329274
name: tstgz
@@ -345,10 +290,10 @@ jobs:
345290
path: pkg
346291
pattern: pkg-*
347292
merge-multiple: true
348-
- name: Download Release Notes
349-
uses: actions/download-artifact@v4
350-
with:
351-
name: relnotes
293+
# - name: Download Release Notes
294+
# uses: actions/download-artifact@v4
295+
# with:
296+
# name: relnotes
352297
- name: Download Compatibility Report
353298
uses: actions/download-artifact@v4
354299
with:
@@ -376,7 +321,8 @@ jobs:
376321
set -ex
377322
CCF_VERSION=${{ github.ref_name }}
378323
CCF_VERSION=${CCF_VERSION#ccf-}
379-
gh release create --title $CCF_VERSION --draft --notes-file rel-notes.md ${{ github.ref_name }} pkg/* wheel/*.whl tstgz/*.tgz sbom/* tls_report.html compatibility_report.json
324+
echo "Remove me"
325+
# gh release create --title $CCF_VERSION --draft --notes-file rel-notes.md ${{ github.ref_name }} pkg/* wheel/*.whl tstgz/*.tgz sbom/* tls_report.html compatibility_report.json
380326
shell: bash
381327
env:
382328
GH_TOKEN: ${{ github.token }}

scripts/extract-release-notes.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,6 @@
66
import sys
77
import subprocess
88

9-
MICROSOFT_ARTIFACT_REGISTRY_NAME = "mcr.microsoft.com"
10-
MICROSOFT_ARTIFACT_REGISTRY_PREFIX = "product"
11-
CCF_APP_IMAGE_PREFIX = "ccf/app"
12-
CCF_MCR_IMAGES = {
13-
"App Development": f"{CCF_APP_IMAGE_PREFIX}/dev",
14-
"C++ Runtime": f"{CCF_APP_IMAGE_PREFIX}/run",
15-
"TypeScript/JavaScript Runtime": f"{CCF_APP_IMAGE_PREFIX}/run-js",
16-
}
17-
189

1910
def main():
2011
parser = argparse.ArgumentParser(
@@ -41,12 +32,6 @@ def main():
4132
help="Fix any automatically correctable errors",
4233
action="store_true",
4334
)
44-
parser.add_argument(
45-
"--append-mcr-images",
46-
help="If true, automatically append MCR images URLs to release notes",
47-
action="store_true",
48-
default=False,
49-
)
5035
parser.add_argument(
5136
"--describe-path-changes",
5237
help="If true, add a note whenever the given path has changes between releases.",
@@ -163,17 +148,6 @@ def main():
163148
f"\n- **Note**: This release include changes to `{path}`, which may be viewed [here](https://github.com/Microsoft/CCF/compare/{prev_version}...{git_version}#files_bucket)"
164149
)
165150

166-
if args.append_mcr_images:
167-
print("\n**MCR Docker Images:** ", end="")
168-
print(
169-
", ".join(
170-
[
171-
f"[{desc}](https://{MICROSOFT_ARTIFACT_REGISTRY_NAME}/{MICROSOFT_ARTIFACT_REGISTRY_PREFIX}/{name}/tags)"
172-
for desc, name in CCF_MCR_IMAGES.items()
173-
]
174-
)
175-
)
176-
177151
else:
178152
print("CHANGELOG is valid!")
179153

0 commit comments

Comments
 (0)