From d573834cd5949f26e3d9fd5ec95dda5277ff40c5 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Tue, 17 Nov 2020 14:06:57 +0100 Subject: [PATCH 1/3] add workflow for automatic creation of phar build per PR --- .github/workflows/phar-creation.yml | 66 +++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/phar-creation.yml diff --git a/.github/workflows/phar-creation.yml b/.github/workflows/phar-creation.yml new file mode 100644 index 00000000..f880c727 --- /dev/null +++ b/.github/workflows/phar-creation.yml @@ -0,0 +1,66 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +name: "Building Require-Checker phar" + +on: + pull_request: + push: + branches: + - "master" + +jobs: + build: + name: "Building Require-Checker phar" + + runs-on: ${{ matrix.operating-system }} + + strategy: + matrix: + dependencies: + - "locked" + php-version: + - "7.4" + operating-system: + - "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP" + uses: "shivammathur/setup-php@v2" + with: + tools: "phing" + coverage: "none" + php-version: "${{ matrix.php-version }}" + ini-values: memory_limit=-1 + + - name: "Cache dependencies" + uses: "actions/cache@v2" + with: + path: | + ~/.composer/cache + vendor + key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" + + - name: "Install lowest dependencies" + if: ${{ matrix.dependencies == 'lowest' }} + run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" + + - name: "Install highest dependencies" + if: ${{ matrix.dependencies == 'highest' }} + run: "composer update --no-interaction --no-progress --no-suggest" + + - name: "Install locked dependencies" + if: ${{ matrix.dependencies == 'locked' }} + run: "composer install --no-interaction --no-progress --no-suggest" + + - name: "build via phing" + run: "phing" + + - name: "Upload phar file artifact" + uses: actions/upload-artifact@v2 + with: + name: composer-require-checker.phar + path: build/composer-require-checker.phar From aaa1b1155167beeec65b2ca0e0f8cab9a8082e33 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Tue, 17 Nov 2020 14:18:28 +0100 Subject: [PATCH 2/3] add ini setting for phar not only being readonly --- .github/workflows/phar-creation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phar-creation.yml b/.github/workflows/phar-creation.yml index f880c727..b8ef9572 100644 --- a/.github/workflows/phar-creation.yml +++ b/.github/workflows/phar-creation.yml @@ -33,7 +33,7 @@ jobs: tools: "phing" coverage: "none" php-version: "${{ matrix.php-version }}" - ini-values: memory_limit=-1 + ini-values: memory_limit=-1, phar.readonly=0 - name: "Cache dependencies" uses: "actions/cache@v2" From 9616a1eae60eb7d991fad4f98e259d6f7c327324 Mon Sep 17 00:00:00 2001 From: Daniel Badura Date: Fri, 27 Nov 2020 15:53:53 +0100 Subject: [PATCH 3/3] remove master as target for this workflow --- .github/workflows/phar-creation.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/phar-creation.yml b/.github/workflows/phar-creation.yml index b8ef9572..d07bb957 100644 --- a/.github/workflows/phar-creation.yml +++ b/.github/workflows/phar-creation.yml @@ -4,9 +4,6 @@ name: "Building Require-Checker phar" on: pull_request: - push: - branches: - - "master" jobs: build: