-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (38 loc) · 1.5 KB
/
static_cli.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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,opcache,zip" --build-cli