diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1e1cd8..4fbe2f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,27 +19,27 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 5.4 + php-version: 8.0 extensions: exif, phar, openssl coverage: none ini-values: phar.readonly=Off - - name: Install Box from GitHub - run: | - curl -LSs https://box-project.github.io/box2/installer.php | php - test -f ./box.phar - test -d ~/bin || mkdir ~/bin - mv ./box.phar ~/bin/box - ~/bin/box -V - echo "$HOME/bin" >> $GITHUB_PATH - - name: Install Composer dependencies uses: ramsey/composer-install@v1 with: composer-options: "--no-dev" + - name: Install Box + run: wget https://github.com/humbug/box/releases/latest/download/box.phar -O box.phar && chmod 0755 box.phar && pwd + + - name: Validate configuration + run: php box.phar validate -i box.json + - name: Building binary... - run: box build -v + run: php box.phar compile -v --config=box.json + + - name: Show info about the build phar with humbug/box + run: php box.phar info -l parallel-lint.phar - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af42559..697a4e3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,27 +45,27 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 5.4 + php-version: 8.0 extensions: exif, phar, openssl coverage: none ini-values: phar.readonly=Off, error_reporting=E_ALL, display_errors=On - - name: Install Box from GitHub - run: | - curl -LSs https://box-project.github.io/box2/installer.php | php - test -f ./box.phar - test -d ~/bin || mkdir ~/bin - mv ./box.phar ~/bin/box - ~/bin/box -V - echo "$HOME/bin" >> $GITHUB_PATH - - name: Install Composer dependencies uses: ramsey/composer-install@v1 with: composer-options: "--no-dev" + - name: Install Box + run: wget https://github.com/humbug/box/releases/latest/download/box.phar -O box.phar && chmod 0755 box.phar && pwd + + - name: Validate configuration + run: php box.phar validate -i box.json + - name: Building binary... - run: box build -v + run: php box.phar compile -v --config=box.json + + - name: Show info about the build phar with humbug/box + run: php box.phar info -l parallel-lint.phar - uses: actions/upload-artifact@v2 with: diff --git a/box.json b/box.json index 8c6fc81..0bb609c 100644 --- a/box.json +++ b/box.json @@ -1,11 +1,16 @@ { + "base-path": null, "output": "parallel-lint.phar", "chmod": "0755", + "check-requirements": false, "compactors": [ - "Herrera\\Box\\Compactor\\Php" + "KevinGH\\Box\\Compactor\\Php" ], - "extract": false, "main": "parallel-lint", + "directories": [ + "bin", + "src" + ], "files": [ "LICENSE" ], @@ -14,15 +19,7 @@ "name": ["*.php"], "exclude": ["Tests", "tests"], "in": "vendor" - }, - { - "exclude": ["Tests"], - "in": "src" - }, - { - "in": "bin" } ], - "stub": true, - "web": false + "stub": true }