Skip to content

Commit

Permalink
build config
Browse files Browse the repository at this point in the history
  • Loading branch information
bangnokia committed Apr 5, 2024
1 parent d7fef92 commit b154168
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 32 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
32 changes: 0 additions & 32 deletions .github/workflows/run-tests.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
/.idea
/.vscode
/.vagrant
/bin/*
/.phpunit.cache
.phpunit.result.cache
composer.lock
phpunit.xml.dist.bak
lina.phar

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions box.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"composer.json",
"server.php"
],
"output": "builds/lina.phar",
"exclude-composer-files": false,
"compression": "GZ",
"compactors": [
Expand Down
Binary file removed builds/lina
Binary file not shown.

0 comments on commit b154168

Please sign in to comment.