Skip to content

Commit

Permalink
Switching to a pure workflow process.
Browse files Browse the repository at this point in the history
In the investigation of the build failures I came across this issue. RubixML/Tensor#22

In that issue user federicoemartinez was able to get the build to work with this workflow file. https://github.com/federicoemartinez/Tensor/blob/master/.github/workflows/php7.4-windows

I'm testing that out as a possibility for building with PHP 8.2. If that succeeds then I will try more versions of PHP.
  • Loading branch information
jb-lopez committed Dec 25, 2022
1 parent ae6b3e8 commit 8a52ce7
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 230 deletions.
83 changes: 54 additions & 29 deletions .github/workflows/tensor.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,63 @@
name: 'Tensor'
on:
workflow_dispatch:
on: [workflow_dispatch]
jobs:
build:
name: build
runs-on: windows-2019
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3']
extensions: [tensor]
sdk_version: [master]
vs: [vs16]
ts: [ts, nts]
arch: [x64]
include:
- extensions: tensor
repo: RubixML/Tensor
branch: master
args: enable-tensor
# version: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
version: ['8.2']
arch: [x64]
ts: [ts, nts]
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
- name: build
run: |
pwsh scripts/tensor.ps1 ${{ matrix.extensions }} ${{ matrix.repo }} ${{ matrix.branch }} ${{ matrix.args }} ${{ matrix.sdk_version }} ${{ matrix.vs }} ${{ matrix.arch }} ${{ matrix.ts }} ${{ matrix.php }}
$exit_code = $?
if(-not($exit_code)) {
exit $exit_code
}
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.extensions }}_${{ matrix.ts }}_${{ matrix.arch }}
path: ${{ matrix.extensions }}
- name: Checkout tensor
uses: actions/checkout@v2
- name: Setup PHP
id: setup-php
uses: cmb69/[email protected]
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php.outputs.toolset}}
- name: Download dependencies
run: |
curl -LO https://github.com/xianyi/OpenBLAS/releases/download/v0.3.20/OpenBLAS-0.3.20-x64.zip
7z x OpenBLAS-0.3.20-x64.zip -odeps
- name: phpize
run: cd ext && phpize
- name: configure
run: cd ext && configure --enable-tensor --enable-debug-pack --with-prefix=${{steps.setup-php.outputs.prefix}}
- name: make
run: cd ext && nmake
- name: package
run: |
xcopy deps\bin\libopenblas.dll install\*
if exist ext\${{matrix.arch}}\Release (
xcopy ext\${{matrix.arch}}\Release\php_tensor.dll install\*
xcopy ext\${{matrix.arch}}\Release\php_tensor.pdb install\*
) else if exist ext\Release (
xcopy ext\Release\php_tensor.dll install\*
xcopy ext\Release\php_tensor.pdb install\*
) else if exist ext\${{matrix.arch}}\Release_TS (
xcopy ext\${{matrix.arch}}\Release_TS\php_tensor.dll install\*
xcopy ext\${{matrix.arch}}\Release_TS\php_tensor.pdb install\*
) else if exist ext\Release_TS (
xcopy ext\Release_TS\php_tensor.dll install\*
xcopy ext\Release_TS\php_tensor.pdb install\*
)
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: php_tensor-dev-${{matrix.version}}-${{matrix.ts}}-vs16-${{matrix.arch}}
path: install
release:
runs-on: ubuntu-latest
needs: build
Expand Down
201 changes: 0 additions & 201 deletions scripts/tensor.ps1

This file was deleted.

0 comments on commit 8a52ce7

Please sign in to comment.