Skip to content

Commit 88f82ea

Browse files
authored
Merge branch '1.x' into use-flow-test-case
2 parents a201e07 + 2007333 commit 88f82ea

File tree

44 files changed

+529
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+529
-420
lines changed

.codecov.yaml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
flag_management:
2+
individual_flags:
3+
- name: etl
4+
paths:
5+
- src/core
6+
- name: cli
7+
paths:
8+
- src/cli
9+
- name: lib-array-dot
10+
paths:
11+
- src/lib/array-dot
12+
- name: lib-azure-sdk
13+
paths:
14+
- src/lib/azure-sdk
15+
- name: lib-doctrine-dbal-bulk
16+
paths:
17+
- src/lib/doctrine-dbal-bulk
18+
- name: lib-filesystem
19+
paths:
20+
- src/lib/filesystem
21+
- name: lib-parquet
22+
paths:
23+
- src/lib/parquet
24+
- name: lib-parquet-viewer
25+
paths:
26+
- src/lib/parquet-viewer
27+
- name: lib-rdsl
28+
paths:
29+
- src/lib/rdsl
30+
- name: lib-snappy
31+
paths:
32+
- src/lib/snappy
33+
- name: bridge-filesystem-async-aws
34+
paths:
35+
- src/bridge/filesystem/async-aws
36+
- name: bridge-filesystem-azure
37+
paths:
38+
- src/bridge/filesystem/azure
39+
- name: bridge-monolog-http
40+
paths:
41+
- src/bridge/monolog/http
42+
- name: symfony-http-foundation
43+
paths:
44+
- src/bridge/symfony/http-foundation
45+
- name: adapter-chartjs
46+
paths:
47+
- src/adapter/etl-adapter-chartjs
48+
- name: adapter-csv
49+
paths:
50+
- src/adapter/etl-adapter-csv
51+
- name: adapter-doctrine
52+
paths:
53+
- src/adapter/etl-adapter-doctrine
54+
- name: adapter-elasticsearch
55+
paths:
56+
- src/adapter/etl-adapter-elasticsearch
57+
- name: adapter-google-sheet
58+
paths:
59+
- src/adapter/etl-adapter-google-sheet
60+
- name: adapter-http
61+
paths:
62+
- src/adapter/etl-adapter-http
63+
- name: adapter-json
64+
paths:
65+
- src/adapter/etl-adapter-json
66+
- name: adapter-logger
67+
paths:
68+
- src/adapter/etl-adapter-logger
69+
- name: adapter-meilisearch
70+
paths:
71+
- src/adapter/etl-adapter-meilisearch
72+
- name: adapter-parquet
73+
paths:
74+
- src/adapter/etl-adapter-parquet
75+
- name: adapter-text
76+
paths:
77+
- src/adapter/etl-adapter-text
78+
- name: adapter-xml
79+
paths:
80+
- src/adapter/etl-adapter-xml

.github/workflows/baseline.yml

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
name: Baseline
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag_name:
7+
description: 'Git Tag Name'
8+
required: false
9+
branch_name:
10+
description: 'Git Branch Name'
11+
required: true
12+
default: '1.x'
13+
push:
14+
branches: [ 1.x ]
15+
paths-ignore:
16+
- 'CHANGELOG.md'
17+
18+
jobs:
19+
build-archives:
20+
name: "Build Archives"
21+
22+
runs-on: ubuntu-latest
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
dependencies:
28+
- "locked"
29+
php-version:
30+
- "8.2"
31+
32+
steps:
33+
- name: "Checkout"
34+
uses: "actions/checkout@v4"
35+
with:
36+
fetch-depth: 0
37+
38+
- name: "Install PHP"
39+
uses: "shivammathur/setup-php@v2"
40+
with:
41+
coverage: none
42+
tools: composer:v2
43+
php-version: "${{ matrix.php-version }}"
44+
ini-values: memory_limit=-1
45+
46+
- name: "Get Composer Cache Directory"
47+
id: composer-cache
48+
run: |
49+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
50+
51+
- name: "Cache Composer dependencies"
52+
uses: "actions/cache@v4"
53+
with:
54+
path: "${{ steps.composer-cache.outputs.dir }}"
55+
key: "php-${{ matrix.php-version }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
56+
restore-keys: |
57+
php-${{ matrix.php-version }}-locked-composer-
58+
59+
- name: "Install locked dependencies"
60+
run: "composer install --no-interaction --no-progress"
61+
62+
- name: "Build PHAR file"
63+
run: "composer build:phar"
64+
65+
- name: "Validate Flow PHAR"
66+
run: |
67+
./build/flow.phar --version
68+
69+
- name: Set up Docker Buildx
70+
uses: docker/setup-buildx-action@v3
71+
72+
- name: Set up QEMU
73+
uses: docker/setup-qemu-action@v3
74+
75+
- name: Login to GitHub Container Registry
76+
uses: docker/login-action@v3
77+
with:
78+
registry: ghcr.io
79+
username: ${{ github.actor }}
80+
password: ${{ secrets.GITHUB_TOKEN }}
81+
82+
- name: Build Docker Image
83+
uses: docker/build-push-action@v6
84+
with:
85+
context: .
86+
file: ./Dockerfile
87+
push: true
88+
platforms: linux/amd64,linux/arm64
89+
tags: |
90+
ghcr.io/flow-php/flow:latest
91+
target: flow
92+
cache-from: type=gha
93+
cache-to: type=gha,mode=max
94+
95+
- name: "Prepare artifact name"
96+
if: ${{ github.event_name == 'push' }}
97+
shell: bash
98+
run: |
99+
BUILD_TAG=${GITHUB_SHA:0:7}
100+
echo "BUILD_TAG=$BUILD_TAG" >> $GITHUB_ENV
101+
102+
- uses: actions/upload-artifact@v4
103+
with:
104+
name: flow-${{ env.BUILD_TAG }}.phar
105+
path: build/flow.phar
106+
overwrite: true
107+
108+
benchmark-baseline:
109+
name: "Benchmark Baseline"
110+
111+
runs-on: ubuntu-latest
112+
113+
strategy:
114+
fail-fast: false
115+
matrix:
116+
dependencies:
117+
- "locked"
118+
php-version:
119+
- "8.2"
120+
121+
steps:
122+
- name: "Set Git Ref"
123+
run: |
124+
if [[ "${{ github.event_name }}" == "push" ]]; then
125+
echo "GIT_REF=${{ github.ref }}" >> $GITHUB_ENV
126+
elif [[ "${{ github.event.inputs.tag_name }}" != "" ]]; then
127+
echo "GIT_REF=refs/tags/${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
128+
else
129+
echo "GIT_REF=${{ github.event.inputs.branch_name }}" >> $GITHUB_ENV
130+
fi
131+
132+
- name: "Set Benchmark Tag"
133+
run: |
134+
if [[ "${{ github.event_name }}" == "push" ]]; then
135+
echo "PHPBENCH_TAG=1.x" >> $GITHUB_ENV
136+
elif [[ "${{ github.event.inputs.tag_name }}" != "" ]]; then
137+
echo "PHPBENCH_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
138+
else
139+
echo "PHPBENCH_TAG=${{ github.event.inputs.branch_name }}" >> $GITHUB_ENV
140+
fi
141+
142+
- name: "Checkout to specific ref"
143+
uses: "actions/checkout@v4"
144+
with:
145+
ref: ${{ env.GIT_REF }}
146+
147+
- name: "Install PHP"
148+
uses: "shivammathur/setup-php@v2"
149+
with:
150+
coverage: none
151+
tools: composer:v2
152+
php-version: "${{ matrix.php-version }}"
153+
ini-values: memory_limit=-1
154+
155+
- name: "Get Composer Cache Directory"
156+
id: composer-cache
157+
run: |
158+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
159+
160+
- name: "Cache Composer dependencies"
161+
uses: "actions/cache@v4"
162+
with:
163+
path: "${{ steps.composer-cache.outputs.dir }}"
164+
key: "php-${{ matrix.php-version }}-locked-composer-${{ hashFiles('**/composer.lock') }}"
165+
restore-keys: |
166+
php-${{ matrix.php-version }}-locked-composer-
167+
168+
- name: "Install locked dependencies"
169+
run: "composer install --no-interaction --no-progress"
170+
171+
- name: "Benchmark"
172+
run: |
173+
echo '# Flow PHP - Benchmark - ${{ env.PHPBENCH_TAG }}' >> $GITHUB_STEP_SUMMARY
174+
echo ' ' >> $GITHUB_STEP_SUMMARY
175+
echo '---' >> $GITHUB_STEP_SUMMARY
176+
echo '```' >> $GITHUB_STEP_SUMMARY
177+
tools/phpbench/vendor/bin/phpbench run --report=flow-report --tag=${{ env.PHPBENCH_TAG }} --progress=none >> $GITHUB_STEP_SUMMARY
178+
echo '```' >> $GITHUB_STEP_SUMMARY
179+
180+
- name: "Store Benchmark baseline"
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: phpbench-baseline
184+
path: ./var/phpbench/
185+
overwrite: true
186+
187+
publish-website:
188+
name: "Publish Website"
189+
runs-on: ubuntu-latest
190+
strategy:
191+
fail-fast: false
192+
matrix:
193+
php-version:
194+
- "8.2"
195+
196+
steps:
197+
- name: "Checkout"
198+
uses: "actions/checkout@v4"
199+
200+
- name: "Install PHP"
201+
uses: "shivammathur/setup-php@v2"
202+
with:
203+
tools: composer:v2
204+
php-version: "${{ matrix.php-version }}"
205+
ini-values: memory_limit=-1
206+
extensions: :psr, bcmath, dom, hash, json, mbstring, xml, xmlwriter, xmlreader, zlib
207+
208+
- name: "Get Composer Cache Directory"
209+
id: composer-cache
210+
run: |
211+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
212+
213+
- name: "Cache Composer dependencies"
214+
uses: "actions/cache@v4"
215+
with:
216+
path: "${{ steps.composer-cache.outputs.dir }}"
217+
key: "php-${{ matrix.php-version }}-composer-website-${{ hashFiles('web/landing/composer.lock') }}"
218+
restore-keys: |
219+
php-${{ matrix.php-version }}-composer-website-
220+
221+
- name: "Install project dependencies"
222+
run: "composer install --no-interaction --no-progress --no-suggest"
223+
224+
- name: "Generate documentation"
225+
run: "composer build:docs"
226+
227+
- name: "Install Landing dependencies"
228+
run: "composer install --no-interaction --no-progress --no-suggest"
229+
working-directory: "web/landing"
230+
231+
- name: "Build"
232+
run: "composer build"
233+
env:
234+
SCHEME: https
235+
DOMAIN: flow-php.com
236+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
237+
GOOGLE_ANALYTICS_ID: '${{ vars.GOOGLE_ANALYTICS_ID }}'
238+
GOOGLE_CONVERSION_TAG: '${{ vars.GOOGLE_CONVERSION_TAG }}'
239+
working-directory: "web/landing"
240+
241+
- name: Pushes build to website repository
242+
uses: cpina/github-action-push-to-another-repository@main
243+
env:
244+
API_TOKEN_GITHUB: ${{ secrets.ACCESS_TOKEN }}
245+
with:
246+
source-directory: 'web/landing/build'
247+
destination-github-username: 'flow-php'
248+
destination-repository-name: 'flow-php.com'

0 commit comments

Comments
 (0)