Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate the Spec Release Conformance Matrix #403

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
description: 'Version of Kotlin binary to publish to TBD Artifactory. For example "1.0.0-SNAPSHOT". If not supplied, will default to "commit-$shortSHA-SNAPSHOT" where $shortSHA is the shortform commit SHA. Must end in "-SNAPSHOT".'
required: true
type: string
outputs:
spec_tag:
description: "The tag of the web5-spec"
value: ${{ jobs.assert_spec_version.outputs.spec_tag }}

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -53,6 +57,37 @@ jobs:
use_oidc: true
files: "*.profraw"

assert_spec_version:
runs-on: ubuntu-latest
outputs:
spec_tag: ${{ steps.assert_spec_version.outputs.spec_tag }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Assert Spec Version
id: assert_spec_version
run: |
spec_tag=$(cat .web5-spec)
echo ".web5-spec tag: $spec_tag"
# Get the submodule commit hash
submodule_commit=$(git submodule status | grep web5-spec | awk '{print $1}' | sed 's/^-//')
# Get the tag pointing to this commit, if any
submodule_tag=$(git -C web5-spec describe --tags --exact-match $submodule_commit 2>/dev/null || echo "No tag found")
echo "Web5-spec submodule is at: $submodule_tag"
# TODO: can be removed once we remove the submodule
if [ "$spec_tag" != "$submodule_tag" ]; then
echo "Spec version mismatch: $specTag != $submodule_tag"
exit 1
fi
echo "spec_tag=$spec_tag" >> $GITHUB_OUTPUT
assert_full_test_suite:
runs-on: ubuntu-latest
steps:
Expand Down
Loading
Loading