Skip to content

Commit

Permalink
First upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hvd-0 committed May 8, 2019
1 parent 6b8b216 commit ed14eb7
Show file tree
Hide file tree
Showing 67 changed files with 5,314 additions and 52 deletions.
220 changes: 220 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
version: "{branch}.build.{build}"
skip_tags: true

branches:
only:
- master
- dev

clone_folder: c:\projects\xlswriter

install:
ps: |
if (-not (Test-Path c:\build-cache)) {
mkdir c:\build-cache
}
$bname = 'php-sdk-' + $env:BIN_SDK_VER + '.zip'
if (-not (Test-Path c:\build-cache\$bname)) {
Invoke-WebRequest "https://github.com/OSTC/php-sdk-binary-tools/archive/$bname" -OutFile "c:\build-cache\$bname"
}
$dname0 = 'php-sdk-binary-tools-php-sdk-' + $env:BIN_SDK_VER
$dname1 = 'php-sdk-' + $env:BIN_SDK_VER
if (-not (Test-Path c:\build-cache\$dname1)) {
7z x c:\build-cache\$bname -oc:\build-cache
move c:\build-cache\$dname0 c:\build-cache\$dname1
}
$lname0 = 'zlib-' + $env:ZLIB_VER + '-' + $env:VC + '-' + $env:ARCH + '.zip'
$lname1 = 'zlib'
if (-not (Test-Path c:\build-cache\$lname0)) {
$zliurl = "https://windows.php.net/downloads/php-sdk/deps/" + $env:VC + "/" + $env:ARCH+ "/" + $lname0
Invoke-WebRequest $zliurl -OutFile "c:\build-cache\$lname0"
}
if (-not (Test-Path c:\build-cache\$lname1)) {
& 7z x c:\build-cache\$lname0 -oc:\build-cache\$lname1
}
$lname2 = 'libxlsxwriter-' + $env:LIBXLSXWRITER_VER + '-' + $env:VC + '-' + $env:ARCH + '.zip'
$lname3 = 'libxlsxwriter'
if (-not (Test-Path c:\build-cache\$lname2)) {
$url = "https://windows.php.net/downloads/pecl/deps/" + $lname2
Invoke-WebRequest $url -OutFile "c:\build-cache\$lname2"
}
if (-not (Test-Path c:\build-cache\$lname3)) {
& 7z x c:\build-cache\$lname2 -oc:\build-cache\$lname3
}
move c:\build-cache\zlib\lib\*.* c:\build-cache\libxlsxwriter\lib
move c:\build-cache\zlib\include\*.* c:\build-cache\libxlsxwriter\include
cache:
c:\build-cache -> .appveyor.yml

environment:
BIN_SDK_VER: 2.1.2
LIBXLSXWRITER_VER: 0.7.7
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x64
VC: vc14
PHP_VER: 7.0.28
ZLIB_VER: 1.2.8
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x64
VC: vc14
PHP_VER: 7.0.28
ZLIB_VER: 1.2.8
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x86
VC: vc14
PHP_VER: 7.0.28
ZLIB_VER: 1.2.8
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x86
VC: vc14
PHP_VER: 7.0.28
ZLIB_VER: 1.2.8
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x64
VC: vc14
PHP_VER: 7.1.15
ZLIB_VER: 1.2.8
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x64
VC: vc14
PHP_VER: 7.1.15
ZLIB_VER: 1.2.8
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x86
VC: vc14
PHP_VER: 7.1.15
ZLIB_VER: 1.2.8
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
ARCH: x86
VC: vc14
PHP_VER: 7.1.15
ZLIB_VER: 1.2.8
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x64
VC: vc15
PHP_VER: 7.2.3
ZLIB_VER: 1.2.11
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x64
VC: vc15
PHP_VER: 7.2.3
ZLIB_VER: 1.2.11
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86
VC: vc15
PHP_VER: 7.2.3
ZLIB_VER: 1.2.11
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86
VC: vc15
PHP_VER: 7.2.3
ZLIB_VER: 1.2.11
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x64
VC: vc15
PHP_VER: 7.3.0
ZLIB_VER: 1.2.11
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x64
VC: vc15
PHP_VER: 7.3.0
ZLIB_VER: 1.2.11
TS: 1
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86
VC: vc15
PHP_VER: 7.3.0
ZLIB_VER: 1.2.11
TS: 0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
ARCH: x86
VC: vc15
PHP_VER: 7.3.0
ZLIB_VER: 1.2.11
TS: 1

build_script:
ps: |
$ts_part = ''
if ('0' -eq $env:TS) { $ts_part = '-nts' }
$bname = 'php-devel-pack-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip'
if (-not (Test-Path c:\build-cache\$bname)) {
Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
if (-not (Test-Path c:\build-cache\$bname)) {
Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
}
}
$dname0 = 'php-' + $env:PHP_VER + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH
$dname1 = 'php-' + $env:PHP_VER + $ts_part + '-devel-' + $env:VC.toUpper() + '-' + $env:ARCH
if (-not (Test-Path c:\build-cache\$dname1)) {
7z x c:\build-cache\$bname -oc:\build-cache
move c:\build-cache\$dname0 c:\build-cache\$dname1
}
cd c:\projects\xlswriter
$env:PATH = 'c:\build-cache\' + $dname1 + ';' + $env:PATH
#echo "@echo off" | Out-File -Encoding "ASCII" task.bat
#echo "" | Out-File -Encoding "ASCII" -Append task.bat
echo "" | Out-File -Encoding "ASCII" task.bat
echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
$conf_cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\libxlsxwriter\include --enable-debug-pack 2>&1'
echo $conf_cmd | Out-File -Encoding "ASCII" -Append task.bat
echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
$here = (Get-Item -Path "." -Verbose).FullName
$runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
$task = $here + '\task.bat'
& $runner -t $task
after_build:
ps: |
$ts_part = 'ts'
if ('0' -eq $env:TS) { $ts_part = 'nts' }
$zip_bname = 'php_xlswriter-' + $env:APPVEYOR_REPO_COMMIT.substring(0, 8) + '-' + $env:PHP_VER.substring(0, 3) + '-' + $ts_part + '-' + $env:VC + '-' + $env:ARCH + '.zip'
$dir = 'c:\projects\xlswriter\';
if ('x64' -eq $env:ARCH) { $dir = $dir + 'x64\' }
$dir = $dir + 'Release'
if ('1' -eq $env:TS) { $dir = $dir + '_TS' }
& 7z a c:\$zip_bname $dir\php_xlswriter.dll c:\projects\xlswriter\LICENSE c:\build-cache\libxlsxwriter\lib\xlsxwriter.lib c:\build-cache\libxlsxwriter\lib\xlsxwriter.pdb
Push-AppveyorArtifact c:\$zip_bname
test_script:
ps: |
$ts_part = ''
if ('0' -eq $env:TS) { $ts_part = '-nts' }
$bname = 'php-' + $env:PHP_VER + $ts_part + '-Win32-' + $env:VC.toUpper() + '-' + $env:ARCH + '.zip'
if (-not (Test-Path c:\build-cache\$bname)) {
Invoke-WebRequest "http://windows.php.net/downloads/releases/archives/$bname" -OutFile "c:\build-cache\$bname"
if (-not (Test-Path c:\build-cache\$bname)) {
Invoke-WebRequest "http://windows.php.net/downloads/releases/$bname" -OutFile "c:\build-cache\$bname"
}
}
$dname = 'php-' + $env:PHP_VER + $ts_part + '-' + $env:VC.toUpper() + '-' + $env:ARCH
if (-not (Test-Path c:\build-cache\$dname)) {
7z x c:\build-cache\$bname -oc:\build-cache\$dname
}
cd c:\projects\xlswriter
echo "" | Out-File -Encoding "ASCII" task.bat
echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat
$cmd = 'call configure --with-xlswriter --with-extra-libs=c:\build-cache\libxlsxwriter\lib --with-extra-includes=c:\build-cache\libxlsxwriter\include --with-prefix=c:\build-cache\' + $dname + ' 2>&1'
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
echo 'nmake /nologo test TESTS="-q --show-diff --set-timeout 120" 2>&1' | Out-File -Encoding "ASCII" -Append task.bat
echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
$here = (Get-Item -Path "." -Verbose).FullName
$runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
$task = $here + '\task.bat'
& $runner -t $task
92 changes: 41 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,52 +1,42 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
.deps
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
*.la
.libs
acinclude.m4
aclocal.m4
autom4te.cache
build
config.guess
config.h
config.h.in
config.log
config.nice
config.status
config.sub
configure
configure.ac
configure.in
install-sh
libtool
ltmain.sh
ltmain.sh.backup
Makefile
Makefile.fragments
Makefile.global
Makefile.objects
missing
mkinstalldirs
modules
run-tests.php
tests/*/*.diff
tests/*/*.out
tests/*/*.php
tests/*/*.exp
tests/*/*.log
tests/*/*.sh
tmp-php.ini
.idea
cmake-build-debug
CMakeLists.txt
local_test.php
xlswriter-*.tgz
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "library"]
path = library
url = https://github.com/jmcnamara/libxlsxwriter.git
branch = RELEASE_0.8.6
29 changes: 29 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
language: php

compiler:
- gcc
- clang

os:
- linux

php:
- 7.0
- 7.1
- 7.2
- 7.3

notifications:
email: [email protected]

before_script:
- git submodule update --init
- sudo apt-get install zlib1g-dev -y
- phpize && ./configure && make clean && make

branches:
only:
- master
- dev
script:
- ./travis/run-test.sh
1 change: 1 addition & 0 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vtiful
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
* Copyright (c) 2017-2018, Jiexin Wang <[email protected]>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading

0 comments on commit ed14eb7

Please sign in to comment.