Files
awslabs_aws-crt-php/.github/workflows/ci.yml
T
Justin Boswell aee57a929d Added test-ffi target, use it in CI (#9)
* Added test-ffi target, use it in CI

* Added clang-format config, fixed RETURN_STRING API mismatch

* Skip installing php and packages on the PHP docker images

* Removed al2 job that was never going to work, and compiler tests

* Fixed basic test for extension loading

* Cleaned up lib structure, fixed tests

* use test-ci target to conditionally test in GitHub

* Use v0.8.1 of builder
2021-02-15 09:47:32 -08:00

102 lines
4.1 KiB
YAML

name: CI
on:
push:
branches:
- '*'
- '!main'
env:
BUILDER_VERSION: v0.8.1
BUILDER_SOURCE: releases
BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net
PACKAGE_NAME: aws-crt-php
LINUX_BASE_IMAGE: ubuntu-16-x64
RUN: ${{ github.run_id }}-${{ github.run_number }}
jobs:
php7-linux-x64-ffi:
runs-on: ubuntu-latest
steps:
- name: Build PHP 7.4 with ffi
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-php7-linux-x64:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF --env LC_ALL=C.UTF-8 --env TEST_FFI=1 $DOCKER_IMAGE --version=${{env.BUILDER_VERSION}} build -p ${{ env.PACKAGE_NAME }} --spec=downstream --skip-install
php7-linux-x64-ext:
runs-on: ubuntu-latest
steps:
- name: Build PHP 7.4 extension
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-php7-linux-x64:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF --env LC_ALL=C.UTF-8 $DOCKER_IMAGE --version=${{env.BUILDER_VERSION}} build -p ${{ env.PACKAGE_NAME }} --spec=downstream --skip-install
php5-linux-x64-ext:
runs-on: ubuntu-latest
steps:
- name: Build PHP 5.6 extension
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u awslabs --password-stdin
export DOCKER_IMAGE=docker.pkg.github.com/awslabs/aws-crt-builder/aws-crt-php5-linux-x64:${{ env.BUILDER_VERSION }}
docker pull $DOCKER_IMAGE
docker run --env GITHUB_REF --env LC_ALL=C.UTF-8 $DOCKER_IMAGE --version=${{env.BUILDER_VERSION}} build -p ${{ env.PACKAGE_NAME }} --spec=downstream --skip-install
# linux-arm:
# name: ARM (${{ matrix.arch }})
# runs-on: ubuntu-latest
# strategy:
# matrix:
# arch: [armv6, armv7, arm64]
# steps:
# - name: Build ${{ env.PACKAGE_NAME }}
# run: |
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
# chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --target=linux-${{ matrix.arch }} --spec=downstream
# windows-vc16:
# runs-on: windows-latest
# strategy:
# matrix:
# arch: [x64]
# steps:
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: ${{ matrix.arch }}
# uwp: false
# spectre: true
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} --spec=downstream
# windows-vc14:
# runs-on: windows-latest
# strategy:
# matrix:
# arch: [x86, x64]
# steps:
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# toolset: 14.0
# arch: ${{ matrix.arch }}
# uwp: false
# spectre: true
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder.pyz')"
# python builder.pyz build -p ${{ env.PACKAGE_NAME }} downstream
# osx:
# runs-on: macos-latest
# steps:
# - name: Build ${{ env.PACKAGE_NAME }} + consumers
# run: |
# python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
# chmod a+x builder
# ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream