Skip to content

Commit

Permalink
azure-core-cpp 1.14.1 (new formula)
Browse files Browse the repository at this point in the history
autobump: add azure-core-cpp

Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
cho-m authored and chenrui333 committed Dec 2, 2024
1 parent d886aab commit a6c2816
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/autobump.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ awsdac
awslogs
axel
azcopy
azure-core-cpp
b2-tools
babel
babl
Expand Down
42 changes: 42 additions & 0 deletions Formula/a/azure-core-cpp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
class AzureCoreCpp < Formula

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / Linux

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 14-x86_64

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 13-arm64

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)

Check notice on line 1 in Formula/a/azure-core-cpp.rb

View workflow job for this annotation

GitHub Actions / macOS 13-x86_64

Bottle cache hit

Bottle for azure-core-cpp built at 3b00e74fb39 (Merge 440561c48d8e7f04e3ad5713e8be7fd2fcf722ef into 71612b2f8b6cafab88322126849daf0011dc67e2, 2024-11-30)
desc "Primitives, abstractions and helpers for Azure SDK client libraries"
homepage "https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/core/azure-core"
url "https://github.com/Azure/azure-sdk-for-cpp/archive/refs/tags/azure-core_1.14.1.tar.gz"
sha256 "e0173a675363463c63f52a215e4b3f1bfb28c901d70fe7eea420b5dc4aa591cb"
license "MIT"

livecheck do
url :stable
regex(/^azure-core[._-]v?(\d+(?:\.\d+)+)$/i)
end

depends_on "cmake" => :build
depends_on "openssl@3"

uses_from_macos "curl"

def install
ENV["AZURE_SDK_DISABLE_AUTO_VCPKG"] = "1"
system "cmake", "-S", "sdk/core/azure-core", "-B", "build", "-DBUILD_SHARED_LIBS=ON", *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
end

test do
# From https://github.com/Azure/azure-sdk-for-cpp/blob/main/sdk/core/azure-core/test/ut/datetime_test.cpp
(testpath/"test.cpp").write <<~CPP
#include <cassert>
#include <azure/core/datetime.hpp>
int main() {
auto dt1 = Azure::DateTime::Parse("20130517T00:00:00Z", Azure::DateTime::DateFormat::Rfc3339);
auto dt2 = Azure::DateTime::Parse("Fri, 17 May 2013 00:00:00 GMT", Azure::DateTime::DateFormat::Rfc1123);
assert(0 != dt2.time_since_epoch().count());
assert(dt1 == dt2);
return 0;
}
CPP
system ENV.cxx, "-std=c++14", "test.cpp", "-o", "test", "-L#{lib}", "-lazure-core"
system "./test"
end
end

0 comments on commit a6c2816

Please sign in to comment.