Skip to content

Commit d9024e6

Browse files
authored
chore: include flow-php/arrow-ext in Dockerfile (#2274)
* chore: include flow-php/arrow-ext in Dockerfile * fix: job-arrow-extension workflow
1 parent 24f3e2d commit d9024e6

26 files changed

Lines changed: 197 additions & 575 deletions

File tree

.github/workflows/job-arrow-extension.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,67 @@ jobs:
9090
token: ${{ secrets.CODECOV_TOKEN }}
9191
directory: ./var/phpunit/coverage/clover
9292
flags: arrow-extension
93+
94+
pie-install-test:
95+
name: Test PIE Installation
96+
runs-on: ${{ matrix.os }}
97+
env:
98+
RUSTUP_TOOLCHAIN: stable
99+
strategy:
100+
fail-fast: false
101+
matrix:
102+
os: ['ubuntu-latest', 'macos-latest']
103+
104+
steps:
105+
- uses: actions/checkout@v5
106+
107+
- name: Setup PHP Environment
108+
uses: ./.github/actions/setup-php-env
109+
with:
110+
php-version: '8.3'
111+
dependencies: locked
112+
extensions: ':psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib'
113+
tools: 'composer:v2, phpize, php-config'
114+
115+
- name: Install Rust toolchain
116+
uses: dtolnay/rust-toolchain@stable
117+
118+
- name: Install build dependencies (Ubuntu)
119+
if: runner.os == 'Linux'
120+
run: |
121+
sudo apt-get update
122+
sudo apt-get install -y build-essential autoconf automake libtool clang libclang-dev
123+
124+
- name: Install build dependencies (macOS)
125+
if: runner.os == 'macOS'
126+
run: |
127+
brew install autoconf automake libtool llvm
128+
echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV
129+
130+
- name: Set LIBCLANG_PATH (Ubuntu)
131+
if: runner.os == 'Linux'
132+
run: |
133+
LIBCLANG_SO=$(find /usr/lib -name 'libclang*.so' -o -name 'libclang*.so.*' 2>/dev/null | head -1)
134+
echo "LIBCLANG_PATH=$(dirname "$LIBCLANG_SO")" >> $GITHUB_ENV
135+
136+
- name: Install PIE
137+
run: |
138+
sudo curl -L -o /usr/local/bin/pie https://github.com/php/pie/releases/latest/download/pie.phar
139+
sudo chmod +x /usr/local/bin/pie
140+
pie --version
141+
142+
- name: Prepare local package for PIE installation
143+
working-directory: src/extension/arrow-ext
144+
run: |
145+
jq '. + {"version": "0.0.9999"}' composer.json > composer.tmp.json
146+
mv composer.tmp.json composer.json
147+
148+
- name: Install extension via PIE (from local)
149+
run: |
150+
sudo pie repository:remove packagist.org
151+
sudo pie repository:add path ${{ github.workspace }}/src/extension/arrow-ext
152+
sudo env "PATH=$PATH" "LIBCLANG_PATH=$LIBCLANG_PATH" "RUSTUP_TOOLCHAIN=$RUSTUP_TOOLCHAIN" "CARGO_HOME=$CARGO_HOME" "RUSTUP_HOME=$RUSTUP_HOME" pie install flow-php/arrow-ext:0.0.9999@dev
153+
154+
- name: Verify extension is loaded
155+
run: |
156+
php -m | grep arrow

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
'Flow/CLI/Tests/Integration',
3737
'Flow/ETL/Tests/Unit/Loader',
3838
'Flow/ETL/Tests/Unit/Exception',
39+
'extension/arrow-ext/ext',
3940
'extension/pg-query-ext/ext',
4041
]);
4142

Dockerfile

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,63 @@
11
# Stage 1: Build stage
22
ARG FLOW_PHP_VERSION=8.3.28
3-
ARG FLOW_BASE_IMAGE_TAG_SUFFIX=cli-alpine3.22
3+
ARG FLOW_BASE_IMAGE_TAG_SUFFIX=cli-bookworm
44
ARG FLOW_BASE_IMAGE_TAG=${FLOW_PHP_VERSION}-${FLOW_BASE_IMAGE_TAG_SUFFIX}
55
ARG FLOW_BASE_IMAGE=php:${FLOW_BASE_IMAGE_TAG}
66

77
FROM ${FLOW_BASE_IMAGE} AS builder
88

99
# Install dependencies and PHP extensions
10-
RUN apk update && apk add --no-cache \
11-
$PHPIZE_DEPS \
12-
gmp-dev \
10+
RUN apt-get update && apt-get install -y --no-install-recommends \
1311
git \
14-
mariadb-dev \
15-
postgresql-dev \
16-
sqlite-dev \
1712
curl \
18-
build-base \
13+
build-essential \
1914
autoconf \
2015
automake \
2116
libtool \
22-
protobuf-dev \
23-
protobuf-c-dev \
17+
pkg-config \
18+
libgmp-dev \
19+
libpq-dev \
20+
libsqlite3-dev \
21+
default-libmysqlclient-dev \
22+
libprotobuf-dev \
23+
libprotobuf-c-dev \
24+
protobuf-compiler \
25+
protobuf-c-compiler \
26+
clang \
27+
libclang-dev \
28+
&& rm -rf /var/lib/apt/lists/* \
2429
&& docker-php-ext-install bcmath gmp pdo_mysql pdo_pgsql pdo_sqlite \
2530
&& curl -L https://github.com/php/pie/releases/latest/download/pie.phar -o /usr/local/bin/pie \
2631
&& chmod +x /usr/local/bin/pie \
2732
&& php /usr/local/bin/pie install kjdev/brotli \
2833
&& php /usr/local/bin/pie install kjdev/lz4 \
2934
&& php /usr/local/bin/pie install kjdev/snappy \
30-
&& php /usr/local/bin/pie install kjdev/zstd \
35+
&& php /usr/local/bin/pie install kjdev/zstd
36+
37+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
38+
ENV PATH="/root/.cargo/bin:${PATH}"
39+
40+
RUN php /usr/local/bin/pie install flow-php/arrow-ext:1.x-dev \
3141
&& php /usr/local/bin/pie install flow-php/pg-query-ext:1.x-dev
3242

3343
# Stage 2: Final Image
3444
FROM ${FLOW_BASE_IMAGE} AS flow
3545

46+
# Install runtime libraries needed by extensions
47+
RUN apt-get update && apt-get install -y --no-install-recommends \
48+
libpq5 \
49+
libgmp10 \
50+
&& rm -rf /var/lib/apt/lists/*
51+
3652
# Copy the built extensions from the builder stage
3753
COPY --from=builder /usr/local/lib/php/extensions /usr/local/lib/php/extensions
3854
COPY --from=builder /usr/local/etc/php/conf.d /usr/local/etc/php/conf.d
3955

40-
# Copy necessary libraries for the extensions
41-
COPY --from=builder /usr/lib/libgmp.so.10 /usr/lib/
42-
COPY --from=builder /usr/lib/libstdc++.so.6 /usr/lib/
43-
COPY --from=builder /usr/lib/libgcc_s.so.1 /usr/lib/
44-
COPY --from=builder /usr/lib/libpq.so.5 /usr/lib/
45-
4656
# Copy your PHP application
4757
COPY build/flow.phar /flow-php/flow.phar
4858
RUN chmod +x /flow-php/flow.phar
4959

5060
# Set the work directory, entrypoint, and volume
5161
WORKDIR /flow-php
5262
ENTRYPOINT ["php", "/flow-php/flow.phar"]
53-
VOLUME ["/flow-php"]
63+
VOLUME ["/flow-php"]

src/bridge/filesystem/async-aws/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Filesystem Azure Bridge
1+
# Filesystem Async AWS Bridge
22

33
This package provides a bridge between the [Filesystem](https://github.com/flow-php/filesystem) and the [Async AWS SDK](https://github.com/async-aws/s3).
44

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - Monolog Telemetry Bridge
1+
# Monolog Telemetry Bridge
22

33
Bridge connecting Flow PHP Telemetry library with Monolog.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/monolog-telemetry-bridge
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/monolog-telemetry-bridge/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/monolog-telemetry-bridge/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)
Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - PHPUnit Telemetry Bridge
1+
# PHPUnit Telemetry Bridge
22

33
PHPUnit extension allowing to collect test suite telemetry and export to OTEL collector.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/phpunit-telemetry-bridge
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/phpunit-telemetry-bridge/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/phpunit-telemetry-bridge/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)
Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - PSR-18 Telemetry Bridge
1+
# PSR-18 Telemetry Bridge
22

33
Bridge connecting Flow PHP Telemetry library with PSR-18 HTTP Client for propagating telemetry context via HTTP requests and responses.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/psr18-telemetry-bridge
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/psr18-telemetry-bridge/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/psr18-telemetry-bridge/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)
Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - PSR-7 Telemetry Bridge
1+
# PSR-7 Telemetry Bridge
22

33
Bridge connecting Flow PHP Telemetry library with PSR-7 HTTP messages for propagating telemetry context via HTTP requests and responses.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/psr7-telemetry-bridge
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/psr7-telemetry-bridge/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/psr7-telemetry-bridge/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)
Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - Symfony Http Foundation Telemetry Bridge
1+
# Symfony Http Foundation Telemetry Bridge
22

33
Bridge connecting Flow PHP Telemetry library with Symfony HttpFoundation for propagating telemetry context via HTTP requests and responses.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/symfony-http-foundation-telemetry-bridge
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/symfony-http-foundation-telemetry-bridge/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/symfony-http-foundation-telemetry-bridge/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)
Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
1-
# Flow PHP - Symfony Telemetry Bundle
1+
# Symfony Telemetry Bundle
22

3-
Bridge connecting Flow PHP Telemetry library with Symfony HttpFoundation for propagating telemetry context via HTTP requests and responses.
3+
Symfony bundle integrating Flow PHP Telemetry library for automatic telemetry context propagation.
44

5-
> [!IMPORTANT]
6-
> This repository is a subtree split from our monorepo. If you'd like to contribute,
7-
> please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
5+
> [!IMPORTANT]
6+
> This repository is a subtree split from our monorepo. If you'd like to contribute, please visit our main monorepo [flow-php/flow](https://github.com/flow-php/flow).
87
9-
## Installation
10-
11-
```bash
12-
composer require flow-php/symfony-telemetry-bundle
13-
```
14-
15-
## Resources
16-
17-
- [Documentation](https://flow-php.com/documentation/components/bridges/symfony-telemetry-bundle/)
18-
- [Installation](https://flow-php.com/documentation/installation/)
19-
- [Contributing](https://flow-php.com/documentation/contributing/)
20-
- [Upgrading](https://flow-php.com/documentation/upgrading/)
8+
- 📜 [Documentation](https://flow-php.com/documentation/components/bridges/symfony-telemetry-bundle/)
9+
- ➡️ [Installation](https://flow-php.com/documentation/installation/)
10+
- 🛠️ [Contributing](https://flow-php.com/documentation/contributing/)
11+
- 🚧 [Upgrading](https://flow-php.com/documentation/upgrading/)

0 commit comments

Comments
 (0)