From ad802edd6557c018900a9a3ceac070c665c6c580 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Thu, 4 Dec 2025 18:12:09 +0900 Subject: [PATCH 1/2] fix for newer cmake --- builder/MyBuilder.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/builder/MyBuilder.pm b/builder/MyBuilder.pm index a96b04c..3db4b24 100644 --- a/builder/MyBuilder.pm +++ b/builder/MyBuilder.pm @@ -28,6 +28,16 @@ sub new { $self; } +sub _cmake_version { + my $self = shift; + my $version = `cmake --version`; + if ($version =~ m/version\s+(\d+)\.(\d+)/) { + return (int $1, int $2); + } + + (-1, -1); +} + sub _build_msgpack { my $self = shift; @@ -37,6 +47,12 @@ sub _build_msgpack { -DMSGPACK_BUILD_EXAMPLES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON ); + + my ($major_version, $minor_version) = $self->_cmake_version; + if ($major_version >= 4 || ($major_version >= 3 && $minor_version >= 5)) { + push @opt, "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"; + } + chdir "msgpack-$MSGPACK_VERSION"; my $ok = $self->do_system($self->_cmake, @opt, "."); $ok &&= $self->do_system($Config{make}); From dc6c472b56906f12fd03e31bda37d49608433981 Mon Sep 17 00:00:00 2001 From: Shohei YOSHIDA Date: Thu, 4 Dec 2025 18:17:24 +0900 Subject: [PATCH 2/2] Switch from travis to github actions --- .github/workflows/test.yml | 25 +++++++++++++++++++++++++ .travis.yml | 11 ----------- META.json | 6 +++--- README.md | 2 +- minil.toml | 2 +- 5 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ccedd3a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: CI +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + perl: [ '5.42', '5.40' ] + name: Perl ${{ matrix.perl }} + steps: + - uses: actions/checkout@v5 + - name: Setup perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: ${{ matrix.perl }} + - name: Install build tools + run: sudo apt install cmake + - name: Install dependencies + run: cpanm --installdeps --with-configure . + - name: Build + run: | + perl Build.PL + ./Build + - name: Run test + run: ./Build test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a427065..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: perl -sudo: false -matrix: - include: - - perl: "5.8" - dist: trusty - - perl: "5.10" - dist: trusty - - perl: "5.26" -install: - - cpanm -nq --with-configure --installdeps . diff --git a/META.json b/META.json index 37aa35c..a7cd6ce 100644 --- a/META.json +++ b/META.json @@ -4,7 +4,7 @@ "Daisuke Murase " ], "dynamic_config" : 0, - "generated_by" : "Minilla/v3.1.10, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Minilla/v3.1.28, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -63,7 +63,7 @@ "homepage" : "https://github.com/typester/Data-MessagePack-Stream", "repository" : { "type" : "git", - "url" : "git://github.com/typester/Data-MessagePack-Stream.git", + "url" : "https://github.com/typester/Data-MessagePack-Stream.git", "web" : "https://github.com/typester/Data-MessagePack-Stream" } }, @@ -77,6 +77,6 @@ "Shohei YOSHIDA ", "Shoichi Kaji " ], - "x_serialization_backend" : "JSON::PP version 4.05", + "x_serialization_backend" : "JSON::PP version 4.16", "x_static_install" : 0 } diff --git a/README.md b/README.md index 761896a..9ce0474 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/typester/Data-MessagePack-Stream.svg?branch=master)](https://travis-ci.org/typester/Data-MessagePack-Stream) +[![Actions Status](https://github.com/typester/Data-MessagePack-Stream/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/typester/Data-MessagePack-Stream/actions?workflow=test) [![MetaCPAN Release](https://badge.fury.io/pl/Data-MessagePack-Stream.svg)](https://metacpan.org/release/Data-MessagePack-Stream) # NAME Data::MessagePack::Stream - yet another messagepack streaming deserializer diff --git a/minil.toml b/minil.toml index d4ab86f..4039b92 100644 --- a/minil.toml +++ b/minil.toml @@ -1,7 +1,7 @@ name = "Data-MessagePack-Stream" authority = "cpan:TYPESTER" module_maker = "ModuleBuild" -badges = ['travis'] +badges = ['github-actions/test.yml', 'metacpan'] [build] build_class = "builder::MyBuilder"