forked from aws/aws-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 2.19 KB
/
Copy pathdocs-build.yml
File metadata and controls
59 lines (50 loc) · 2.19 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Build API Documentation
permissions:
contents: read
on:
pull_request:
branches:
- master
jobs:
build_docs:
if: github.repository_owner == 'aws'
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1']
name: Build API documentation for PHP ${{ matrix.php-versions }}
steps:
- name: Setup PHP with JIT
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
coverage: none
php-version: ${{ matrix.php-versions }}
ini-values: memory_limit=4G, phar.readonly=false, opcache.enable=1, opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=128M
- name: Checkout CodeBase
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies
run: composer update --no-interaction --prefer-source
- name: Prepare OS environment
run: |
sudo sed -i s/deb.debian.org/archive.debian.org/g /etc/apt/sources.list
sudo sed -i 's|security.debian.org|archive.debian.org/|g' /etc/apt/sources.list
sudo sed -i '/stretch-updates/d' /etc/apt/sources.list
sudo apt-get -y update && \
sudo apt-get -y install git wget zip unzip libzip-dev libssl-dev libtidy-dev python3 cmake python3-distutils-extra python3-apt
PHP_CONF_DIR=$(php -i | grep "Scan this dir for additional .ini files" | awk '{print $9}')
sudo touch "$PHP_CONF_DIR"/memory.ini \
&& sudo chmod 666 "$PHP_CONF_DIR"/memory.ini \
&& sudo echo "memory_limit = 5048M;" >> "$PHP_CONF_DIR"/memory.ini
sudo touch "$PHP_CONF_DIR"/phar.ini \
&& sudo chmod 666 "$PHP_CONF_DIR"/phar.ini \
&& sudo echo "phar.readonly = Off;" >> "$PHP_CONF_DIR"/phar.ini
sudo touch "$PHP_CONF_DIR"/timezone.ini \
&& sudo chmod 666 "$PHP_CONF_DIR"/timezone.ini \
&& sudo echo "date.timezone ='America/New_York'" >> "$PHP_CONF_DIR"/timezone.ini
- name: Run API docs build
run: |
make api