Commit 17071044 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Add autobuild files

parent 25612300
stages:
- build
- deploy
variables:
AUTOBUILD_PACKAGE_DIR: libwebp
AUTOBUILD_PACKAGE_NAME: libwebp
AUTOBUILD_BUILD_ID: $CI_PIPELINE_ID
build:windows:
stage: build
tags:
- autobuild
- windows
before_script:
- pipenv install
script:
- pipenv run autobuild install -A32
- pipenv run autobuild build -A32
- pipenv run autobuild package -A32
artifacts:
paths:
- ${env:AUTOBUILD_PACKAGE_NAME}-*windows*.tar.bz2
build:windows64:
stage: build
tags:
- autobuild
- windows
before_script:
- pipenv install
script:
- pipenv run autobuild install -A64
- pipenv run autobuild build -A64
- pipenv run autobuild package -A64
artifacts:
paths:
- ${env:AUTOBUILD_PACKAGE_NAME}-*windows64*.tar.bz2
deploy:nexus:
stage: deploy
tags:
- autobuild
- windows
script:
- $FileNameWin32 = Get-ChildItem -Path . -Name -Include ${env:AUTOBUILD_PACKAGE_NAME}-*-windows-${env:AUTOBUILD_BUILD_ID}*.tar.bz2
- curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file .\$FileNameWin32 "https://pkg.alchemyviewer.org/repository/autobuild-external/${env:AUTOBUILD_PACKAGE_DIR}/windows/${FileNameWin32}"
- $FileNameWin64 = Get-ChildItem -Path . -Name -Include ${env:AUTOBUILD_PACKAGE_NAME}-*-windows64-${env:AUTOBUILD_BUILD_ID}*.tar.bz2
- curl.exe -v --user "${env:AUTOBUILD_HTTP_USER}:${env:AUTOBUILD_HTTP_PASS}" --upload-file .\$FileNameWin64 "https://pkg.alchemyviewer.org/repository/autobuild-external/${env:AUTOBUILD_PACKAGE_DIR}/windows64/${FileNameWin64}"
\ No newline at end of file
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
llbase = "*"
certifi = "*"
autobuild = {git = "https://git.alchemyviewer.org/alchemy/autobuild.git"}
[requires]
python_version = "2.7"
<?xml version="1.0" ?>
<llsd>
<map>
<key>package_description</key>
<map>
<key>canonical_repo</key>
<string>https://git.alchemyviewer.org/alchemy/thirdparty/3p-libwebp</string>
<key>copyright</key>
<string>Copyright (c) 2010, Google Inc. All rights reserved.</string>
<key>description</key>
<string>WebP is a modern image format that provides superior lossless and lossy compression for images on the web.</string>
<key>license</key>
<string>BSD</string>
<key>license_file</key>
<string>LICENSES/libwebp.txt</string>
<key>name</key>
<string>libwebp</string>
<key>platforms</key>
<map>
<key>common</key>
<map>
<key>build_directory</key>
<string>stage</string>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>build</key>
<map>
<key>arguments</key>
<array>
<string>-c</string>
<string>../build-cmd.sh</string>
</array>
<key>command</key>
<string>bash</string>
</map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>LICENSES/*</string>
<string>include/*</string>
</array>
<key>name</key>
<string>common</string>
</map>
<key>darwin</key>
<map>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/*</string>
</array>
<key>name</key>
<string>darwin</string>
</map>
<key>linux</key>
<map>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/*</string>
</array>
<key>name</key>
<string>linux</string>
</map>
<key>windows</key>
<map>
<key>configurations</key>
<map>
<key>default</key>
<map>
<key>default</key>
<boolean>true</boolean>
<key>name</key>
<string>default</string>
</map>
</map>
<key>manifest</key>
<array>
<string>lib/*</string>
</array>
<key>name</key>
<string>windows</string>
</map>
</map>
<key>source_directory</key>
<string>libwebp</string>
<key>version_file</key>
<string>VERSION.txt</string>
</map>
<key>type</key>
<string>autobuild</string>
<key>version</key>
<string>1.3</string>
</map>
</llsd>
#!/usr/bin/env bash
cd "$(dirname "$0")"
# turn on verbose debugging output for parabuild logs.
exec 4>&1; export BASH_XTRACEFD=4; set -x
# make errors fatal
set -e
# bleat on references to undefined shell variables
set -u
# Check autobuild is around or fail
if [ -z "$AUTOBUILD" ] ; then
exit 1
fi
if [ "$OSTYPE" = "cygwin" ] ; then
export AUTOBUILD="$(cygpath -u $AUTOBUILD)"
fi
top="$(pwd)"
stage="$(pwd)/stage"
mkdir -p "${stage}"
# Load autobuild provided shell functions and variables
source_environment_tempfile="$stage/source_environment.sh"
"$AUTOBUILD" source_environment > "$source_environment_tempfile"
. "$source_environment_tempfile"
LIBWEBP_SOURCE_DIR="libwebp"
# used in VERSION.txt but common to all bit-widths and platforms
build=${AUTOBUILD_BUILD_ID:=0}
# version will be (e.g.) "1.4.0"
version="1.1.0"
echo "${version}.${build}" > "${stage}/VERSION.txt"
# Create the staging folders
mkdir -p "$stage/lib"/{debug,release}
mkdir -p "$stage/include/webp"
mkdir -p "$stage/LICENSES"
pushd "$LIBWEBP_SOURCE_DIR"
case "$AUTOBUILD_PLATFORM" in
# ------------------------ windows, windows64 ------------------------
windows*)
load_vsvars
nmake /f Makefile.vc CFG=debug-static RTLIBCFG=dynamic OBJDIR=output
nmake /f Makefile.vc CFG=release-static RTLIBCFG=dynamic OBJDIR=output
;;
darwin*)
;;
linux*)
;;
esac
mkdir -p "$stage/LICENSES"
cp COPYING "$stage/LICENSES/libwebp.txt"
popd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment