Skip to content

Commit

Permalink
Automate the Spec Release Conformance Matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
leordev committed Oct 25, 2024
1 parent 2dd3b77 commit 6bd8b1f
Show file tree
Hide file tree
Showing 4 changed files with 385 additions and 289 deletions.
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 [ "$specTag" != "$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

0 comments on commit 6bd8b1f

Please sign in to comment.