diff --git a/.github/workflows/build-native.yml b/.github/workflows/build-native.yml index 2bcda4f..cb3cbca 100644 --- a/.github/workflows/build-native.yml +++ b/.github/workflows/build-native.yml @@ -1,7 +1,7 @@ --- # Runs the build based on the provided files in test.yml -name: build +name: build-native on: workflow_call: diff --git a/.github/workflows/build-packages.yml b/.github/workflows/build-packages.yml index 66708ae..42858ca 100644 --- a/.github/workflows/build-packages.yml +++ b/.github/workflows/build-packages.yml @@ -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" diff --git a/.github/workflows/build-php-deps.yml b/.github/workflows/build-php-deps.yml new file mode 100644 index 0000000..db59ad1 --- /dev/null +++ b/.github/workflows/build-php-deps.yml @@ -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_* diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e97dfd..456647f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: