mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
Initial Tests & CI (#5)
* Added awscrt_version() and test for it * Added builder.json for CI * Added github actions * Added format-check.sh * Force php5.6 on ubuntu * Updated submodules
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '*'
|
||||
- '!main'
|
||||
|
||||
env:
|
||||
BUILDER_VERSION: v0.7.7
|
||||
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:
|
||||
al2:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
|
||||
- name: Build ${{ env.PACKAGE_NAME }} + consumers
|
||||
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-al2-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
|
||||
|
||||
clang-compat:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [3, 6, 8, 9]
|
||||
steps:
|
||||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
|
||||
- name: Build ${{ env.PACKAGE_NAME }}
|
||||
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-${{ env.LINUX_BASE_IMAGE }}:${{ 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 --compiler=clang-${{ matrix.version }}
|
||||
|
||||
gcc-compat:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
version: [4.8, 5, 6, 7, 8]
|
||||
fail-fast: false
|
||||
steps:
|
||||
# We can't use the `uses: docker://image` version yet, GitHub lacks authentication for actions -> packages
|
||||
- name: Build ${{ env.PACKAGE_NAME }}
|
||||
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-${{ env.LINUX_BASE_IMAGE }}:${{ 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 --compiler=gcc-${{ matrix.version }}
|
||||
|
||||
# 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
|
||||
Reference in New Issue
Block a user