diff --git a/.github/workflows/test-linux.yaml b/.github/workflows/test-linux.yaml new file mode 100644 index 0000000..1d1a8fe --- /dev/null +++ b/.github/workflows/test-linux.yaml @@ -0,0 +1,40 @@ +name: Test linux workflow + +on: + pull_request: + push: + schedule: + - cron: 0 0 * * 5 + +jobs: + plugin-test-linux: + strategy: + matrix: + # ref: https://github.com/actions/runner-images + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: install vfox (Linux) + run: | + echo "deb [trusted=yes] https://apt.fury.io/versionfox/ /" | sudo tee /etc/apt/sources.list.d/versionfox.list + sudo apt-get update + sudo apt-get install vfox + + - name: Install packages + run: sudo apt-get update && sudo apt-get install -y autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev + + - name: Generate PHP plugin + run: | + zip -r php.zip ./ + + - name: Test + run: | + vfox add -s php.zip + vfox install php@latest + vfox use -p php@$(vfox list php | sed -n 's/-> v//p') + eval "$(vfox activate bash)" + php -v + php -m + composer -V diff --git a/.github/workflows/test-macos.yaml b/.github/workflows/test-macos.yaml new file mode 100644 index 0000000..6cb2d60 --- /dev/null +++ b/.github/workflows/test-macos.yaml @@ -0,0 +1,40 @@ +name: Test macos workflow + +on: + pull_request: + push: + schedule: + - cron: 0 0 * * 5 + +jobs: + plugin-test-macos: + strategy: + matrix: + # ref: https://github.com/actions/runner-images + os: [macos-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: install vfox (MacOS) + run: | + brew tap version-fox/tap + brew install vfox + + - name: Generate PHP plugin + run: | + zip -r php.zip ./ + + - name: Install packages + run: brew install autoconf automake bison freetype gd gettext icu4c krb5 libedit libiconv libjpeg libpng libxml2 libzip pkg-config re2c zlib + + - name: Test + shell: bash + run: | + vfox add -s php.zip + vfox install php@latest + vfox use -p php@$(vfox list php | sed -n 's/-> v//p') + eval "$(vfox activate bash)" + php -v + php -m + composer -V diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml new file mode 100644 index 0000000..bf2661e --- /dev/null +++ b/.github/workflows/test-windows.yaml @@ -0,0 +1,34 @@ +name: Test windows workflow + +on: + pull_request: + push: + schedule: + - cron: 0 0 * * 5 + +jobs: + plugin-test-windows: + strategy: + matrix: + # ref: https://github.com/actions/runner-images + os: [windows-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: install vfox and test (Windows) + shell: pwsh + run: | + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression + scoop install vfox + Compress-Archive -Path .\* -DestinationPath .\php.zip + vfox -v + vfox add -s php.zip + vfox install php@latest + vfox use -p php@$(vfox list php | sed -n 's/-> v//p') + Invoke-Expression "$(vfox activate pwsh)" + php -v + php -m + composer -V