Giter Site home page Giter Site logo

php-appveyor's Introduction

php-appveyor.psm1

Install PHP and its tooling on AppVeyor CI.

php-appveyor.psm1 is a small PowerShell script which provides functions to install stable PHP versions, PHP DevPack, PHP SDK binary tools and doing some usual provision tasks on the AppVeyor CI.

Usage

Add the following to your .appveyor.yml file:

environment:
  # Use this matrix as an example
  matrix:

    # Specify matrix item for your app
    - PHP_VERSION: 7.3
      VC_VERSION: 15
      BUILD_TYPE: nts-Win32
      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015

  # Specify required PHP SDK binary tools if you need SDK
  PHP_SDK_VERSION: 2.1.9

  PHP_AVM: https://raw.githubusercontent.com/sergeyklay/php-appveyor/master/php-appveyor.psm1

# Cache PHP and tooling
cache:
  # The C:\Downloads directory will be used as a storage for downloaded archives.
  # So you may want to cache it.
  - 'C:\Downloads -> .appveyor.yml'

# Specify required architecture.
# Supported architectures are ``x86`` and ``x64``
platform:
  - x64

install:
  # Download php-appveyor.psm1 module and invoke it to the current session
  - ps: (new-object Net.WebClient).DownloadString($Env:PHP_AVM) | iex

  - ps: InstallPhpSdk     $Env:PHP_SDK_VERSION $Env:VC_VERSION $Env:PLATFORM
  - ps: InstallPhp        $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM
  - ps: InstallPhpDevPack $Env:PHP_VERSION $Env:BUILD_TYPE $Env:VC_VERSION $Env:PLATFORM

  # An example to install PECL extension
  - ps: >-
      InstallPeclExtension `
        -Name       psr `
        -Version    0.6.1 `
        -PhpVersion $Env:PHP_VERSION `
        -BuildType  $Env:BUILD_TYPE `
        -VC         $Env:VC_VERSION `
        -Platform   $Env:PLATFORM

  # An example to enable PHP extension
  - ps: >-
      EnablePhpExtension `
        -Name          my_ext `
        -PhpPath       C:\php `       # Optional
        -ExtPath       C:\my_ext `    # Optional
        -PrintableName "My Extension" # Optional

build_script:
  # Your code here

For more completely example see .appveyor.yml in this project.

Real world projects with php-appveyor.psm1

  • Phalcon Framework - High performance, full-stack PHP framework delivered as a C extension
  • PHP Zephir Parser - The Zephir Parser delivered as a C extension for the PHP language

License

php-appveyor.psm1 is open source software licensed under the MIT License (MIT). See the LICENSE file for more information.

php-appveyor's People

Contributors

alexndrmac avatar loilo avatar maxgoryunov avatar mruz avatar sergeyklay avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

php-appveyor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.