Skip to content

Commit

Permalink
Minor cleanups and a Github workflow to archive a release.
Browse files Browse the repository at this point in the history
  • Loading branch information
inazarenko committed Oct 10, 2024
1 parent 6f29063 commit d851be3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/bzlmod-archive.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Bzlmod Archive

on:
release:
types: [published]

jobs:
# A release archive is required for bzlmod
# See: https://blog.bazel.build/2023/02/15/github-archive-checksum.html
upload-archive:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: git archive -o "${{ format('{0}-{1}.tar.gz', github.event.repository.name, github.event.release.tag_name) }}" HEAD
- run: gh release upload ${{ github.event.release.tag_name }} *.tar.gz
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run the tests
run: bazel test -j 4 //...
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

module(name = "protobuf-matchers")
module(name = "protobuf-matchers", version = "0.1.0")
bazel_dep(name = "protobuf", version = "27.3", repo_name = "com_google_protobuf")
bazel_dep(name = "googletest", version = "1.14.0", repo_name = "com_google_googletest")
bazel_dep(name = "rules_cc", version = "0.0.9")
10 changes: 6 additions & 4 deletions protobuf-matchers/protocol-buffer-matchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,11 @@
#include <initializer_list>
#include <iomanip>
#include <iostream>
#include <limits>
#include <memory>
#include <sstream>
#include <string>
#include <string_view>
#include <vector>

#include "gmock/gmock-matchers.h"
Expand Down Expand Up @@ -1185,16 +1187,16 @@ inline InnerProtoMatcher WithDifferencerConfig(
return inner_proto_matcher;
}

// Aliases in this namespace are provided for historical reasons. Prefer directly
// referring to the definitions in ::protobuf_matchers.
// Aliases in this namespace are provided for historical reasons. Prefer
// directly referring to the definitions in ::protobuf_matchers.
namespace proto {

using ::protobuf_matchers::Approximately;
using ::protobuf_matchers::TreatingNaNsAsEqual;
using ::protobuf_matchers::IgnoringFields;
using ::protobuf_matchers::IgnoringFieldPaths;
using ::protobuf_matchers::IgnoringFields;
using ::protobuf_matchers::IgnoringRepeatedFieldOrdering;
using ::protobuf_matchers::Partially;
using ::protobuf_matchers::TreatingNaNsAsEqual;
using ::protobuf_matchers::WhenDeserialized;
using ::protobuf_matchers::WhenDeserializedAs;
using ::protobuf_matchers::WithDifferencerConfig;
Expand Down

0 comments on commit d851be3

Please sign in to comment.