2019-11-26 17:11:55 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2020-10-07 11:47:41 +02:00
|
|
|
container: ${{ matrix.container }}
|
2019-11-26 17:11:55 +01:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-06-17 14:08:41 +02:00
|
|
|
os: [macOS-latest, windows-2016, ubuntu-20.04]
|
2019-11-26 17:11:55 +01:00
|
|
|
platform: [x64, x86]
|
2020-10-07 11:47:41 +02:00
|
|
|
include:
|
|
|
|
- os: ubuntu-18.04
|
|
|
|
platform: x64
|
|
|
|
container: alpine
|
2019-11-26 17:11:55 +01:00
|
|
|
exclude:
|
|
|
|
- os: macOS-latest
|
|
|
|
platform: x86
|
2021-06-17 14:08:41 +02:00
|
|
|
- os: ubuntu-20.04
|
2021-04-19 13:24:04 +02:00
|
|
|
platform: x86
|
2019-11-26 17:11:55 +01:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
fetch-depth: 10
|
|
|
|
|
|
|
|
- name: Prepare (Linux)
|
2021-06-17 14:08:41 +02:00
|
|
|
if: matrix.os == 'ubuntu-20.04' && matrix.container != 'alpine'
|
2019-11-26 17:11:55 +01:00
|
|
|
run: |
|
2021-06-17 14:08:41 +02:00
|
|
|
sudo apt-get install libtool-bin libtomcrypt1 libtomcrypt-dev libtommath1 libtommath-dev libicu-dev zlib1g-dev
|
2019-11-26 17:11:55 +01:00
|
|
|
|
|
|
|
- name: Build (Linux)
|
2021-06-17 14:08:41 +02:00
|
|
|
if: matrix.os == 'ubuntu-20.04' && matrix.container != 'alpine'
|
2019-11-26 17:11:55 +01:00
|
|
|
run: |
|
2021-06-17 14:08:41 +02:00
|
|
|
CC=clang CXX=clang++ ./autogen.sh --enable-binreloc --prefix=/opt/firebird
|
|
|
|
make -j4
|
2019-11-26 17:11:55 +01:00
|
|
|
make dist
|
|
|
|
tar xzvf gen/Firebird-[0-9]*.tar.gz
|
|
|
|
(cd Firebird-[0-9]*; sudo ./install.sh -silent)
|
|
|
|
|
2020-10-07 11:47:41 +02:00
|
|
|
- name: Prepare (Linux, Alpine)
|
|
|
|
if: matrix.os == 'ubuntu-18.04' && matrix.container == 'alpine'
|
|
|
|
run: apk update && apk --no-cache --update add build-base libtool git autoconf automake zlib-dev icu-dev ncurses-dev libedit-dev linux-headers tar
|
|
|
|
|
|
|
|
- name: Build (Linux, Alpine)
|
|
|
|
if: matrix.os == 'ubuntu-18.04' && matrix.container == 'alpine'
|
|
|
|
run: |
|
|
|
|
./autogen.sh --enable-binreloc-threads --with-builtin-tommath --prefix=/opt/firebird
|
|
|
|
make -j4
|
|
|
|
make dist
|
|
|
|
tar xzvf gen/Firebird-[0-9]*.tar.gz
|
|
|
|
|
2019-11-26 17:11:55 +01:00
|
|
|
- name: Prepare (MacOS)
|
|
|
|
if: matrix.os == 'macOS-latest'
|
|
|
|
run: |
|
|
|
|
brew install automake libtool
|
|
|
|
export LIBTOOLIZE=glibtoolize
|
|
|
|
export LIBTOOL=glibtool
|
|
|
|
|
|
|
|
mkdir extern/icu-macos
|
|
|
|
pushd extern/icu-macos
|
2019-12-01 02:16:38 +01:00
|
|
|
curl -OL https://github.com/unicode-org/icu/releases/download/release-59-2/icu4c-59_2-src.tgz
|
|
|
|
curl -OL https://github.com/unicode-org/icu/commit/24aeb9a5a5874f4ce5db912e30670ac3ae236971.patch
|
2019-12-01 02:09:31 +01:00
|
|
|
tar xzf icu4c-59_2-src.tgz
|
2019-11-26 17:11:55 +01:00
|
|
|
ICU_INSTALL_PATH=`pwd`/install
|
|
|
|
cd icu/source
|
|
|
|
patch -p3 < ../../24aeb9a5a5874f4ce5db912e30670ac3ae236971.patch
|
|
|
|
./runConfigureICU MacOSX --prefix=$ICU_INSTALL_PATH
|
|
|
|
make -j4
|
|
|
|
make install
|
|
|
|
install_name_tool -id @rpath/lib/libicuuc.dylib $ICU_INSTALL_PATH/lib/libicuuc.dylib
|
|
|
|
install_name_tool -id @rpath/lib/libicui18n.dylib $ICU_INSTALL_PATH/lib/libicui18n.dylib
|
|
|
|
install_name_tool -id @rpath/lib/libicudata.dylib $ICU_INSTALL_PATH/lib/libicudata.dylib
|
|
|
|
install_name_tool -change libicudata.59.dylib @loader_path/libicudata.59.dylib $ICU_INSTALL_PATH/lib/libicuuc.59.dylib
|
|
|
|
install_name_tool -change libicudata.59.dylib @loader_path/libicudata.59.dylib $ICU_INSTALL_PATH/lib/libicui18n.59.dylib
|
|
|
|
install_name_tool -change libicuuc.59.dylib @loader_path/libicuuc.59.dylib $ICU_INSTALL_PATH/lib/libicui18n.59.dylib
|
|
|
|
popd
|
|
|
|
mkdir -p gen/Release/firebird/lib
|
|
|
|
mkdir -p gen/Debug/firebird/lib
|
|
|
|
cp $ICU_INSTALL_PATH/lib/*.dylib gen/Release/firebird/lib/
|
|
|
|
cp $ICU_INSTALL_PATH/lib/*.dylib gen/Debug/firebird/lib/
|
|
|
|
|
|
|
|
- name: Build (MacOS)
|
|
|
|
if: matrix.os == 'macOS-latest'
|
|
|
|
run: |
|
|
|
|
export LIBTOOLIZE=glibtoolize
|
|
|
|
export LIBTOOL=glibtool
|
|
|
|
|
|
|
|
ICU_INSTALL_PATH=`pwd`/extern/icu-macos/install
|
|
|
|
|
|
|
|
export C_INCLUDE_PATH="$ICU_INSTALL_PATH/include:$C_INCLUDE_PATH"
|
|
|
|
export CPLUS_INCLUDE_PATH="$ICU_INSTALL_PATH/include:$CPLUS_INCLUDE_PATH"
|
|
|
|
|
|
|
|
LIBRARY_PATH="$ICU_INSTALL_PATH/lib:$LIBRARY_PATH" ./autogen.sh --with-builtin-tommath
|
|
|
|
make -j4
|
|
|
|
|
|
|
|
(cd gen; make -B -f make.platform.postfix ICU_LOC="$ICU_INSTALL_PATH/lib/")
|
|
|
|
(cd gen; make -B -f Makefile.install)
|
|
|
|
|
|
|
|
# Rename directory to make sure the build is relocatable.
|
|
|
|
mv gen gen2
|
|
|
|
sudo installer -pkg gen2/Release/*.pkg -verbose -target /
|
|
|
|
|
|
|
|
export FIREBIRD_LOCK=`pwd`/temp
|
|
|
|
echo "create database 't.fdb'; select '1' from rdb\$database; select _win1252 '2' from rdb\$database; select _utf8 '3' collate unicode from rdb\$database;" | /Library/Frameworks/Firebird.framework/Resources/bin/isql
|
|
|
|
|
|
|
|
echo "create database 'localhost:/tmp/t.fdb' user sysdba password 'masterkey'; select '11' from rdb\$database; select _win1252 '22' from rdb\$database; select _utf8 '33' collate unicode from rdb\$database;" | /Library/Frameworks/Firebird.framework/Resources/bin/isql
|
|
|
|
|
|
|
|
mv gen2 gen
|
|
|
|
mkdir gen/artifacts
|
|
|
|
mv gen/Release/*.pkg gen/artifacts
|
|
|
|
|
|
|
|
- name: Prepare (Windows)
|
|
|
|
if: matrix.os == 'windows-2016'
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
for /r %%i in (*.bat) do unix2dos "%%i"
|
|
|
|
|
|
|
|
- name: Build (Windows)
|
|
|
|
if: matrix.os == 'windows-2016'
|
|
|
|
shell: cmd
|
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.platform }}
|
|
|
|
run: |
|
|
|
|
set
|
2019-11-27 17:29:49 +01:00
|
|
|
if "%PLATFORM%" == "x64" set FB_VS_ARCH=amd64
|
2019-11-26 17:11:55 +01:00
|
|
|
if "%PLATFORM%" == "x64" set FB_PROCESSOR_ARCHITECTURE=AMD64
|
|
|
|
if "%PLATFORM%" == "x64" set FB_OUTPUT_SUFFIX=x64
|
2019-11-27 17:29:49 +01:00
|
|
|
if "%PLATFORM%" == "x86" set FB_VS_ARCH=x86
|
2019-11-26 17:11:55 +01:00
|
|
|
if "%PLATFORM%" == "x86" set FB_PROCESSOR_ARCHITECTURE=x86
|
|
|
|
if "%PLATFORM%" == "x86" set FB_OUTPUT_SUFFIX=win32
|
|
|
|
set
|
2019-11-27 17:29:49 +01:00
|
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=%FB_VS_ARCH%
|
2019-11-26 17:11:55 +01:00
|
|
|
cd builds\win32
|
|
|
|
run_all.bat JUSTBUILD
|
|
|
|
|
|
|
|
- name: Upload (Linux)
|
2021-06-17 14:08:41 +02:00
|
|
|
if: matrix.os == 'ubuntu-20.04' && matrix.container != 'alpine'
|
2019-11-26 17:11:55 +01:00
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: firebird-linux
|
|
|
|
path: gen/Firebird-[0-9]*.tar.gz
|
|
|
|
|
2020-10-07 11:47:41 +02:00
|
|
|
- name: Upload (Linux, Alpine)
|
|
|
|
if: matrix.os == 'ubuntu-18.04' && matrix.container == 'alpine'
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: firebird-linux-alpine
|
|
|
|
path: gen/Firebird-[0-9]*.tar.gz
|
|
|
|
|
2019-11-26 17:11:55 +01:00
|
|
|
- name: Upload (MacOS)
|
|
|
|
if: matrix.os == 'macOS-latest'
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: firebird-macos
|
|
|
|
path: gen/artifacts
|
|
|
|
|
|
|
|
- name: Upload (Windows x64)
|
|
|
|
if: matrix.os == 'windows-2016' && matrix.platform == 'x64'
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: firebird-windows-x64
|
|
|
|
path: output_x64
|
|
|
|
|
|
|
|
- name: Upload (Windows x86)
|
|
|
|
if: matrix.os == 'windows-2016' && matrix.platform == 'x86'
|
|
|
|
uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: firebird-windows-x86
|
|
|
|
path: output_win32
|