Skip to content

Static CLI Build

Static CLI Build #8

Workflow file for this run

name: Static CLI build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
build:
name: build ${{ matrix.php-versions }} on macOS x86_64
runs-on: macos-latest
strategy:
matrix:
php-versions: ['8.2']
steps:
- uses: actions/checkout@v3
# Install macOS missing packages and mark os suffix
- run: |
brew install automake gzip
echo "SPC_BUILD_OS=macos" >> $GITHUB_ENV
# Cache composer dependencies
- id: cache-static-php-cli
uses: actions/cache@v3
with:
path: /tmp/static-php-cli
key: cache-static-php-cli
- name: Download static-php-cli
if: steps.cache-static-php-cli.outputs.cache-hit != 'true'
run: |
# Clone only the specific commit to save time and space
git clone --depth 1 --branch main https://github.com/crazywhalecc/static-php-cli.git /tmp/static-php-cli
cd /tmp/static-php-cli
git checkout 4e99211bc37ae37aae6ee7918fc7669be505bc9a
# Install composer dependencies
composer install --no-dev --no-interaction --no-progress --no-suggest --no-scripts --prefer-dist --optimize-autoloader
- if: steps.cache-static-php-cli.outputs.cache-hit != 'true'
run: cd /tmp/static-php-cli && ./bin/spc download --with-php=${{ matrix.php-versions }} --all
# Run build command
- run: cd /tmp/static-php-cli && ./bin/spc build "curl,glfw,mbstring,zip" --build-cli --debug