Skip to content

Commit

Permalink
Merge branch 'main' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo82148 committed Jun 10, 2024
2 parents 28eae78 + 4045371 commit 8c11116
Show file tree
Hide file tree
Showing 34 changed files with 1,727 additions and 1,840 deletions.
3 changes: 1 addition & 2 deletions .github/build-openssl-darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -e

OPENSSL_VERSION=3.2.1
OPENSSL_VERSION=3.3.1
ROOT=$(cd "$(dirname "$0")" && pwd)
: "${RUNNER_TEMP:=$ROOT/working}"
: "${RUNNER_TOOL_CACHE:=$RUNNER_TEMP/dist}"
Expand Down Expand Up @@ -58,5 +58,4 @@ echo "::endgroup::"
# configure for building Net::SSLeay
cat <<__END__ >> "$GITHUB_ENV"
OPENSSL_PREFIX=$PREFIX
DYLD_LIBRARY_PATH=$PREFIX/lib:$DYLD_LIBRARY_PATH
__END__
6 changes: 1 addition & 5 deletions .github/build-openssl-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -e

OPENSSL_VERSION=3.2.1
OPENSSL_VERSION=3.3.1
ROOT=$(cd "$(dirname "$0")" && pwd)
: "${RUNNER_TEMP:=$ROOT/working}"
: "${RUNNER_TOOL_CACHE:=$RUNNER_TEMP/dist}"
Expand Down Expand Up @@ -49,8 +49,4 @@ echo "::endgroup::"
# configure for building Net::SSLeay
cat <<__END__ >> "$GITHUB_ENV"
OPENSSL_PREFIX=$PREFIX
LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
__END__

export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
sudo ldconfig
2 changes: 1 addition & 1 deletion .github/build-openssl-win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set -e

OPENSSL_VERSION=3.2.1
OPENSSL_VERSION=3.3.1
ROOT=$(cd "$(dirname "$0")" && pwd)
: "${RUNNER_TEMP:=$ROOT/working}"
: "${RUNNER_TOOL_CACHE:=$RUNNER_TEMP/dist}"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/darwin-x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

sanity-check:
runs-on: macos-11
runs-on: macos-12
steps:
- id: perl
name: check pre-installed perl version
Expand All @@ -63,7 +63,7 @@ jobs:
PERL5LIB: ${{ github.workspace }}/scripts/lib

build:
runs-on: macos-11
runs-on: macos-12
needs:
- sanity-check
- list
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }}

build-multi-thread:
runs-on: macos-11
runs-on: macos-12
needs:
- sanity-check
- list
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-24.04
- ubuntu-22.04
- ubuntu-20.04
multi-thread:
Expand Down Expand Up @@ -103,7 +104,6 @@ jobs:
- macos-14
- macos-13
- macos-12
- macos-11
multi-thread:
- false
- true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-build-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
path: scripts/linux/cpanfile.snapshot

darwin:
runs-on: macos-11
runs-on: macos-12
steps:
- name: setup host perl
run: perl -MConfig -E 'say "$Config{bin}"' >> "$GITHUB_PATH"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ The action works for [GitHub-hosted runners](https://docs.github.com/en/actions/

| Operating System | Supported Versions |
| ---------------- | ---------------------------------------------- |
| Linux | `ubuntu-20.04`, `ubuntu-22.04` |
| macOS | `macos-11`, `macos-12`, `macos-13`, `macos-14` |
| Linux | `ubuntu-20.04`, `ubuntu-22.04`, `ubuntu-24.04` |
| macOS | `macos-12`, `macos-13`, `macos-14` |
| Windows | `windows-2019`, `windows-2022` |

[Self-hosted runners](https://docs.github.com/en/actions/hosting-your-own-runners) are not supported.
Expand Down
9 changes: 2 additions & 7 deletions author/carton/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@ RUN curl --compressed -sSL https://raw.githubusercontent.com/tokuhirom/Perl-Buil
RUN apk del perl patch

ENV PATH=/opt/perl-5.8/bin:$PATH
RUN curl --compressed -sSL https://cpanmin.us/ | perl - --notest Distribution::[email protected] App::FatPacker::[email protected] Carton ExtUtils::PL2Bat
RUN curl --compressed -sSL https://cpanmin.us/ | \
perl - --notest Carton ExtUtils::PL2Bat

RUN mkdir -p /tmp/carton
WORKDIR /tmp/carton

COPY cpanfile .
COPY build.pl .
COPY cpanfile.snapshot .

RUN carton install --deployment
33 changes: 22 additions & 11 deletions author/carton/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,36 @@ all: carton

.PHONY: image
image: .image.exists ## build docker image of packing environment
.DELETE_ON_ERROR: .image.exists
.image.exists: Dockerfile cpanfile cpanfile.snapshot build.pl
touch .image.exists
-docker rmi $(IMAGE_NAME)
docker build -t $(IMAGE_NAME) .
touch .image.exists

.container.exists: .image.exists
-docker rm $(IMAGE_NAME)-tmp
docker run --name $(IMAGE_NAME)-tmp $(IMAGE_NAME) perl build.pl
touch .container.exists

carton: .container.exists ## generate fat-packed carton
docker cp $(IMAGE_NAME)-tmp:/tmp/carton/carton carton
carton: .deps.exists build.pl ## generate fat-packed carton
cat build.pl | docker run --rm -i --volumes-from $(IMAGE_NAME)-deps $(IMAGE_NAME) perl -
docker cp $(IMAGE_NAME)-deps:/tmp/carton/carton carton

.PHONY: deps
deps: .deps.exists ## install dependencies
.DELETE_ON_ERROR: .deps.exists
.deps.exists: .image.exists cpanfile.snapshot
touch .deps.exists
-docker rm $(IMAGE_NAME)-deps
docker create -v /tmp/carton --name $(IMAGE_NAME)-deps $(IMAGE_NAME) /bin/true
docker cp cpanfile $(IMAGE_NAME)-deps:/tmp/carton/cpanfile
docker cp cpanfile.snapshot $(IMAGE_NAME)-deps:/tmp/carton/cpanfile.snapshot
docker run --rm --volumes-from $(IMAGE_NAME)-deps $(IMAGE_NAME) carton install --deployment
docker cp $(IMAGE_NAME)-deps:/tmp/carton/local .

.PHONY: update
update: .image.exists ## download dependencies and update cpanfile.snapshot
-docker rm $(IMAGE_NAME)-update
docker run --name $(IMAGE_NAME)-update $(IMAGE_NAME) \
sh -c "rm -f cpanfile.snapshot && rm -rf local && carton install"
docker create -v /tmp/carton --name $(IMAGE_NAME)-update $(IMAGE_NAME) /bin/true
docker cp cpanfile $(IMAGE_NAME)-update:/tmp/carton/cpanfile
docker run --rm --volumes-from $(IMAGE_NAME)-update $(IMAGE_NAME) carton install
docker cp $(IMAGE_NAME)-update:/tmp/carton/cpanfile.snapshot cpanfile.snapshot
-docker rm $(IMAGE_NAME)-update

.PHONY: install
install: all ## installs into the bin directory of this repository
Expand All @@ -36,7 +47,7 @@ install: all ## installs into the bin directory of this repository
.PHONY: clean
clean:
rm -f carton carton.bat
rm -f .image.exists .container.exists
rm -f .image.exists .deps.exists
-docker rm $(IMAGE_NAME)-tmp
-docker rm $(IMAGE_NAME)-update
-docker rmi $(IMAGE_NAME)
9 changes: 9 additions & 0 deletions author/carton/build.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/local/lib/perl5";
use App::FatPacker::Simple;
use Carton::Snapshot;
use ExtUtils::PL2Bat qw/pl2bat/;
Expand All @@ -18,6 +19,14 @@ sub fatpack {
',',
# configure modules
'Module::Build',
# fat-packing
'App::FatPacker', 'App::FatPacker::Simple',
'Clone', 'Distribution::Metadata',
'ExtUtils::CBuilder', 'ExtUtils::ParseXS',
'IO::String', 'JSON', 'Module::Build::Tiny', 'PPI',
'Params::Util', 'Cwd', 'List::Util',
'Perl::Strip', 'Scalar::Util', 'Storable',
'Task::Weaken', 'Perl::OSType', 'XSLoader', 'common::sense',
# test modules
'Test2','App::Prove','TAP::Harness',
# core modules of perl 5
Expand Down
5 changes: 5 additions & 0 deletions author/carton/cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ requires 'perl', '5.006';
requires 'Carton';
requires 'Menlo::Legacy';
requires 'Menlo';
requires 'CPAN::Meta::Requirements', '==2.140'; # 2.141 doesn't support perl 5.8.
requires 'Distribution::Metadata', '==0.06';
requires 'App::FatPacker::Simple', '==0.09';
requires 'Module::Build::Tiny', '==0.047'; # 0.048 doesn't work on perl 5.8.

requires 'Menlo::Index::Mirror';
requires 'ExtUtils::Manifest', '1.70';
requires 'ExtUtils::MakeMaker', '7.52';
Expand Down
Loading

0 comments on commit 8c11116

Please sign in to comment.