Skip to content

Commit

Permalink
Merge pull request #90 from jolicode/castorception
Browse files Browse the repository at this point in the history
Use Castor to build Castor
  • Loading branch information
lyrixx authored Jun 2, 2023
2 parents 5a3fa65 + ac541b5 commit c041ab4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
19 changes: 8 additions & 11 deletions .github/actions/phar/action.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: 'Build the PHAR'
description: 'Build the PHAR for the current commit'
name: 'Build phars for all systems'
description: 'Build phars for the current commit'

runs:
using: "composite"
steps:
- name: Install tools
uses: ./.github/actions/tools

- name: Compile PHAR Linux
run: vendor/bin/box compile -c box.linux-amd64.json
- name: Compile phar Linux
run: bin/castor castor:phar:linux
shell: bash
working-directory: tools/phar

- name: Compile PHAR Darwin
run: vendor/bin/box compile -c box.darwin-amd64.json
- name: Compile phar Darwin
run: bin/castor castor:phar:darwin
shell: bash
working-directory: tools/phar

- name: Compile PHAR Windows
run: vendor/bin/box compile -c box.windows-amd64.json
- name: Compile phar Windows
run: bin/castor castor:phar:windows
shell: bash
working-directory: tools/phar

- name: Ensure PHAR is OK
run: build/castor.linux-amd64.phar --version
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/tools/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Install PHAR tooling'
description: 'Install PHAR tools to build the PHAR'
name: 'Install phar tooling'
description: 'Install phar tools to build the phar'

runs:
using: "composite"
Expand All @@ -13,7 +13,7 @@ runs:
run: composer install --prefer-dist --no-progress --no-dev --optimize-autoloader --classmap-authoritative
shell: bash

- name: Install dependencies (PHAR builder)
- name: Install dependencies (phar builder)
run: composer install --prefer-dist --no-progress --optimize-autoloader --classmap-authoritative
shell: bash
working-directory: tools/phar
12 changes: 6 additions & 6 deletions .github/workflows/build-phar.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build the PHAR
name: Build all the phars

on:
push:
Expand All @@ -9,30 +9,30 @@ permissions:

jobs:
phar:
name: Create a PHAR and upload it as an artifact
name: Create phars and upload them as an artifact
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build the PHAR
- name: Build all the phars
uses: ./.github/actions/phar

- name: Upload the Linux PHAR
- name: Upload the Linux phar
uses: actions/upload-artifact@v3
with:
name: 'castor.linux-amd64.phar'
path: tools/phar/build/castor.linux-amd64.phar
if-no-files-found: error

- name: Upload the Darwin PHAR
- name: Upload the Darwin phar
uses: actions/upload-artifact@v3
with:
name: 'castor.darwin-amd64.phar'
path: tools/phar/build/castor.darwin-amd64.phar
if-no-files-found: error

- name: Upload the Windows PHAR
- name: Upload the Windows phar
uses: actions/upload-artifact@v3
with:
name: 'castor-windows-amd64.phar'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Attach PHAR to the release
name: Attach phars to the release

on:
release:
Expand All @@ -9,13 +9,13 @@ permissions:

jobs:
phar_release:
name: Create a PHAR and upload it
name: Create phars and upload them
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build the PHAR
- name: Build all the phars
uses: ./.github/actions/phar

- name: Get release
Expand Down

0 comments on commit c041ab4

Please sign in to comment.