diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0bdde0f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Run test + +on: [ push, pull_request ] + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ 8.3 ] + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: | + vendor/bin/pest + + - name: Compile phar file + run: | + composer install --no-dev + make build-phar + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: phar + path: ./builds/lina.phar diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d6c5dc5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: Run test + +on: [ release ] + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [ 8.3 ] + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: | + vendor/bin/pest + + - name: Compile phar file + run: | + composer install --no-dev + make build-phar + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: phar + path: ./builds/lina.phar diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml deleted file mode 100644 index 9584a4d..0000000 --- a/.github/workflows/run-tests.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Run test - -on: [push, pull_request] - -jobs: - tests: - - runs-on: ubuntu-latest - - strategy: - fail-fast: true - matrix: - php: [8.3] - - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Install dependencies - run: composer install --prefer-dist --no-progress --no-suggest - - - name: Run test suite - run: | - vendor/bin/pest diff --git a/.gitignore b/.gitignore index ccf28c5..6ad2929 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,10 @@ /.idea /.vscode /.vagrant +/bin/* /.phpunit.cache .phpunit.result.cache composer.lock phpunit.xml.dist.bak +lina.phar + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..134c282 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +build-macos: + ./bin/spc micro:combine ./lina.phar --with-micro=./bin/php-8.3.4-micro-macos-aarch64.sfx --output=./builds/lina-macos-aarch64 + +build-phar: + ./vendor/laravel-zero/framework/bin/box compile diff --git a/box.json b/box.json index 48ae25c..b90f465 100644 --- a/box.json +++ b/box.json @@ -10,6 +10,7 @@ "composer.json", "server.php" ], + "output": "builds/lina.phar", "exclude-composer-files": false, "compression": "GZ", "compactors": [ diff --git a/builds/lina b/builds/lina deleted file mode 100755 index f381451..0000000 Binary files a/builds/lina and /dev/null differ