diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 3cd0e3e..08905a2 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -19,10 +19,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: perl -V - name: install dependencies - uses: perl-actions/install-with-cpm@v1 + uses: perl-actions/install-with-cpm@stable with: cpanfile: "cpanfile" - name: Makefile.PL @@ -35,9 +35,7 @@ jobs: needs: [ubuntu] env: PERL_USE_UNSAFE_INC: 0 - AUTHOR_TESTING: 1 AUTOMATED_TESTING: 1 - RELEASE_TESTING: 1 runs-on: ubuntu-latest @@ -46,6 +44,10 @@ jobs: matrix: perl-version: [ + "5.40", + "5.38", + "5.36", + "5.34", "5.32", "5.30", "5.28", @@ -58,22 +60,19 @@ jobs: "5.14", "5.12", "5.10", - "5.8", ] - container: - image: perl:${{ matrix.perl-version }} - steps: - - uses: actions/checkout@v2 - - run: perl -V - - name: install dependencies - uses: perl-actions/install-with-cpm@v1 + - uses: actions/checkout@v4 + - name: Set up perl ${{ matrix.perl-version }} + uses: shogo82148/actions-setup-perl@v1 with: - sudo: false - cpanfile: "cpanfile" + perl-version: ${{ matrix.perl-version }} + - run: perl -V - name: Makefile.PL run: perl -I$(pwd) Makefile.PL + - name: make + run: make - name: make test run: make test @@ -81,25 +80,40 @@ jobs: needs: [ubuntu] env: PERL_USE_UNSAFE_INC: 0 - AUTHOR_TESTING: 1 AUTOMATED_TESTING: 1 - RELEASE_TESTING: 1 runs-on: macOS-latest - strategy: - fail-fast: false - matrix: - perl-version: [latest] - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: perl -V - name: install dependencies - uses: perl-actions/install-with-cpm@v1 + uses: perl-actions/install-with-cpm@stable with: cpanfile: "cpanfile" - name: Makefile.PL run: perl -I$(pwd) Makefile.PL - name: make test run: make test + + windows: + needs: [ubuntu] + env: + PERL_USE_UNSAFE_INC: 0 + AUTOMATED_TESTING: 1 + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Strawberry Perl + uses: shogo82148/actions-setup-perl@v1 + with: + perl-version: "5.38" + - run: perl -V + - name: Makefile.PL + run: perl Makefile.PL + - name: make + run: gmake + - name: make test + run: gmake test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ca508a2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -sudo: required -dist: trusty -language: cpp -compiler: -- gcc -before_install: -# for gcc with C++11 support -- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test -- sudo apt-get -qq update -install: -# install GTest and GMock -- sudo apt-get -qq install libgtest-dev -- "cd /usr/src/gtest && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -" -- sudo apt-get -qq install google-mock -- "cd /usr/src/gmock && sudo cmake . && sudo cmake --build . && sudo mv libg* /usr/local/lib/ ; cd -" -# update to gcc with C++11 support -- sudo apt-get -qq install gcc-4.9 g++-4.9 -- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90 -- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90 -- sudo apt-get -qq install libtest-simple-perl -- sudo apt-get -qq install libtest-harness-perl -- sudo apt-get -qq install libdigest-perl -# install latest LCOV (1.9 was failing) -- cd ${TRAVIS_BUILD_DIR} -- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz -- tar xf lcov_1.11.orig.tar.gz -- sudo make -C lcov-1.11/ install -- gem install coveralls-lcov -- lcov --version -- g++ --version -before_script: -- cd ${TRAVIS_BUILD_DIR} -# init coverage to 0 (optional) -- lcov --directory . --zerocounters -script: -- cd ${TRAVIS_BUILD_DIR} -# Check that this works this way -- perl Makefile.PL -- make -- make test diff --git a/MD5.xs b/MD5.xs index 581b0e6..b69bdc7 100644 --- a/MD5.xs +++ b/MD5.xs @@ -45,6 +45,10 @@ # define PERL_MAGIC_ext '~' #endif +#ifndef Newx +# define Newx(v,n,t) New(0,v,n,t) +#endif + #ifndef Newxz # define Newxz(v,n,t) Newz(0,v,n,t) #endif @@ -127,7 +131,7 @@ STATIC int dup_md5_ctx(pTHX_ MAGIC *mg, CLONE_PARAMS *params) { MD5_CTX *new_ctx; PERL_UNUSED_VAR(params); - New(55, new_ctx, 1, MD5_CTX); + Newx(new_ctx, 1, MD5_CTX); memcpy(new_ctx, mg->mg_ptr, sizeof(MD5_CTX)); mg->mg_ptr = (char *)new_ctx; return 0; @@ -582,7 +586,7 @@ new(xclass) if (!SvROK(xclass)) { STRLEN my_na; const char *sclass = SvPV(xclass, my_na); - New(55, context, 1, MD5_CTX); + Newx(context, 1, MD5_CTX); ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, sclass)); } else { context = get_md5_ctx(aTHX_ xclass); @@ -598,7 +602,7 @@ clone(self) const char *myname = sv_reftype(SvRV(self),TRUE); MD5_CTX* context; PPCODE: - New(55, context, 1, MD5_CTX); + Newx(context, 1, MD5_CTX); ST(0) = sv_2mortal(new_md5_ctx(aTHX_ context, myname)); memcpy(context,cont,sizeof(MD5_CTX)); XSRETURN(1); diff --git a/t/files.t b/t/files.t index 7d2bc0b..8df96d1 100644 --- a/t/files.t +++ b/t/files.t @@ -22,7 +22,7 @@ EOT # This is the output of: 'md5sum README MD5.xs rfc1321.txt' $EXPECT = <