Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install php dependencies #26

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-native.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---

# Runs the build based on the provided files in test.yml
name: build
name: build-native

on:
workflow_call:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ jobs:
with:
name: build-native-${{ matrix.arch }}
path: prod/native/_build/${{ matrix.arch }}-release/
- uses: actions/download-artifact@v4
with:
name: php-dependencies
path: prod/php/
- name: Build packages
run: |
mkdir -p "${PWD}/build/packages"
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/build-php-deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---

name: build-php-deps

on:
workflow_call: ~
workflow_dispatch: ~

jobs:
build-php-deps:
name: build-php-dependencies
runs-on: ubuntu-latest
timeout-minutes: 300
strategy:
fail-fast: false
env:
COMPOSER_ALLOW_SUPERUSER: 1
steps:
- uses: actions/checkout@v4
- name: Build PHP dependencies
run: |
uname -a

PHP_VERSIONS=( 80 81 82 83 )

for PHP_VERSION in "${PHP_VERSIONS[@]}"
do
mkdir -p "prod/php/vendor_${PHP_VERSION}"

docker run --rm \
-v ${PWD}:/sources \
-v ${PWD}/prod/php/vendor_${PHP_VERSION}:/sources/vendor \
-w /sources \
php:${PHP_VERSION:0:1}.${PHP_VERSION:1:1}-cli sh -c "apt-get update && apt-get install -y unzip && curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin && composer --ignore-platform-req=ext-opentelemetry --ignore-platform-req=ext-otel_instrumentation --no-dev install"

#TODO get licences from dependencies
rm composer.lock

done

- uses: actions/upload-artifact@v4
with:
name: php-dependencies
path: |
prod/php/vendor_*
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,18 @@ jobs:
build-native:
uses: ./.github/workflows/build-native.yml

setup-build-matrix:
uses: ./.github/workflows/build-arch-matrix-generator.yml
with:
build_arch: ${{ inputs.build_arch }}
# setup-build-matrix:
# uses: ./.github/workflows/build-arch-matrix-generator.yml
# with:
# build_arch: ${{ inputs.build_arch }}

build-php-deps:
uses: ./.github/workflows/build-php-deps.yml

build-packages:
needs:
- build-native
- build-php-deps
uses: ./.github/workflows/build-packages.yml

tests-phpt:
Expand Down
Loading