-
-
Notifications
You must be signed in to change notification settings - Fork 2
Add phar build #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add phar build #21
Changes from 11 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
34cffdf
wip
cleptric ea0d385
Move code to subfolder to allow package without dependencies
stayallive 21a3fc9
test CI build
Litarnus 6f334f6
use php72 compatible phpstan
Litarnus 12ed03b
update agent dir
Litarnus 05b5dae
wip
Litarnus 7d1cae0
wip
Litarnus 0112421
commit phar on merge to main
Litarnus c4748d6
craft & release workflow
Litarnus 3420e9c
Update .craft.yml
Litarnus c58e6a2
fix index
Litarnus 2887222
Update .github/workflows/ci.yaml
Litarnus aa2b02c
Update .github/workflows/ci.yaml
Litarnus 23fd4b2
Update .github/workflows/ci.yaml
Litarnus be46d61
Update .github/workflows/phpstan.yaml
Litarnus 0ad705b
Update .github/workflows/phpstan.yaml
Litarnus e82b047
Update agent/composer.json
Litarnus ac25830
updates
Litarnus 2e007a5
Merge remote-tracking branch 'origin/phar-build' into phar-build
Litarnus 5215d73
wip
cleptric 30e8b3f
Add PHAR artifact [skip ci]
github-actions[bot] df73393
wip
cleptric 538f37b
Add PHAR artifact
github-actions[bot] 4c823df
wip
Litarnus 5f17c5e
Add PHAR artifact
github-actions[bot] b0c3903
wip
Litarnus 9a53e34
Merge remote-tracking branch 'origin/phar-build' into phar-build
Litarnus 0ec28db
Add PHAR artifact
github-actions[bot] ecbec55
wip
Litarnus cc1dde6
wip
Litarnus 8c26aea
Add PHAR artifact
github-actions[bot] b868d26
Add PHAR artifact
github-actions[bot] c7cde45
Add PHAR artifact
github-actions[bot] dae94cd
wip
Litarnus cd4963d
Merge remote-tracking branch 'origin/phar-build' into phar-build
Litarnus 48a7d60
Add PHAR artifact
github-actions[bot] 59a368a
wip
Litarnus 8f6b7a8
wip
Litarnus e1e1519
wip
Litarnus 2e5dcae
wip
Litarnus 1bd535e
Add PHAR artifact
github-actions[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| minVersion: 0.23.1 | ||
| changelogPolicy: simple | ||
| artifactProvider: | ||
| name: none | ||
| targets: | ||
| - name: github | ||
| - name: registry | ||
| sdks: | ||
| composer:sentry/sentry-agent: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| name: PHAR | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
|
|
||
| jobs: | ||
| build-agent: | ||
| name: Build Agent | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
| ref: ${{ github.head_ref || github.ref }} | ||
|
|
||
| - name: Setup PHP for agent dependencies | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 | ||
| with: | ||
| php-version: '7.2' | ||
| tools: composer:v2 | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: agent | ||
| run: composer update --no-progress --no-interaction --prefer-dist | ||
|
|
||
| - name: Setup PHP for Box | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
| with: | ||
| php-version: '8.2' | ||
| tools: box | ||
| ini-values: phar.readonly=0 | ||
|
|
||
| - name: Build PHAR | ||
| run: scripts/build.sh | ||
|
|
||
| - name: Setup PHP for PHAR test | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
| with: | ||
| php-version: '7.2' | ||
|
|
||
| - name: Test PHAR | ||
| run: php bin/sentry-agent help | ||
|
|
||
| - name: Upload PHAR artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: sentry-agent-${{ github.sha }} | ||
| path: | | ||
| bin/sentry-agent | ||
|
|
||
| - name: Commit PHAR on main | ||
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
| uses: EndBug/add-and-commit@v9 | ||
| with: | ||
| add: "bin/sentry-agent" | ||
| message: "Add PHAR artifact [skip ci]" | ||
| default_author: github_actions | ||
| push: true | ||
| branch: main | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # [email protected] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,28 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # [email protected] | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
| with: | ||
| php-version: '8.3' | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Install dependencies | ||
| run: composer update --no-progress --no-interaction --prefer-dist | ||
|
|
||
| - name: Run script | ||
| run: vendor/bin/phpstan analyse | ||
|
|
||
| phpstan-agent: | ||
| name: PHPStan (agent) | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: ./agent | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Setup PHP | ||
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # [email protected] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Prepare Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: Version to release | ||
| required: true | ||
| force: | ||
| description: Force a release even when there are release-blockers (optional) | ||
| required: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| name: Release version | ||
| steps: | ||
| - name: Get auth token | ||
| id: token | ||
| uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
| with: | ||
| app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }} | ||
| private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }} | ||
|
|
||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| token: ${{ steps.token.outputs.token }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Prepare release | ||
| uses: getsentry/action-prepare-release@v1 | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.token.outputs.token }} | ||
| with: | ||
| version: ${{ github.event.inputs.version }} | ||
| force: ${{ github.event.inputs.force }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| *.lock | ||
| !agent/composer.lock | ||
| package.xml | ||
| /vendor | ||
| vendor | ||
| .idea | ||
| .php-cs-fixer.cache | ||
| .phpbench | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "main": "src/sentry-agent.php", | ||
| "output": "../bin/sentry-agent" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| { | ||
| "name": "sentry/sentry-agent-internal", | ||
| "type": "library", | ||
| "description": "Sentry Agent for PHP (https://sentry.io)", | ||
| "homepage": "https://sentry.io", | ||
| "license": "MIT", | ||
| "authors": [ | ||
| { | ||
| "name": "Sentry", | ||
| "email": "[email protected]" | ||
| } | ||
| ], | ||
| "require": { | ||
| "php": "^7.2|^8", | ||
|
Litarnus marked this conversation as resolved.
Outdated
|
||
| "ext-json": "*", | ||
| "clue/mq-react": "^1.6", | ||
| "react/http": "^1.11", | ||
| "react/socket": "^1.16", | ||
| "sentry/sentry": "^4.15.0" | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
| "Sentry\\Agent\\": "src/" | ||
| } | ||
| }, | ||
| "require-dev": { | ||
| "phpstan/phpstan": "1.12.5", | ||
| "phpunit/phpunit": "^8.5|^9.6" | ||
| }, | ||
| "autoload-dev": { | ||
| "psr-4": { | ||
| "Sentry\\Agent\\Tests\\": "tests/" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "check": [ | ||
| "@phpstan", | ||
| "@tests" | ||
| ], | ||
| "tests": "vendor/bin/phpunit --verbose", | ||
| "phpstan": "vendor/bin/phpstan analyse" | ||
| }, | ||
| "config": { | ||
| "sort-packages": true, | ||
| "autoloader-suffix": "SentryAgentChecksum" | ||
| }, | ||
| "prefer-stable": true | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.