.appveyor.yml (6578B)
1 --- 2 version: "{build}-{branch}" 3 4 before_build: 5 - git submodule update --init --depth 1 6 7 build_script: 8 - export VCPKG_OVERLAY_TRIPLETS=cmake/vcpkg-triplets 9 - cmake -B build -DCMAKE_BUILD_TYPE=Release 10 -DCMAKE_TOOLCHAIN_FILE=~/vcpkg/scripts/buildsystems/vcpkg.cmake 11 -DVCPKG_TARGET_TRIPLET=arch-env -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$TOOLCHAIN 12 -DCMAKE_OSX_ARCHITECTURES=$ARCH -DCMAKE_OSX_DEPLOYMENT_TARGET=$DEPLOY_TARGET 13 -DRUNTIME_OPENSSL=YES 14 - cmake --build build 15 16 test_script: 17 - sh: '[[ "$ARCH" = arm64 ]] || cmake --build build --target test' 18 - cmd: 'if NOT "%ARCH%" == "arm64ec" cmake --build build --target test' 19 20 for: 21 - matrix: { only: [ appveyor_build_worker_image: &linux Ubuntu1804 ] } 22 cache: 23 - build/vcpkg_installed -> vcpkg.json, cmake/vcpkg-triplets/arch-env.cmake 24 install: |- 25 set -e 26 27 sudo sed -i '/arch=/! s/^deb/deb [arch=amd64,i386]/' /etc/apt/sources.list 28 awk ' 29 $3 !~ /ubuntu\.com/ { next } 30 $1 == "deb" { 31 $2 = "[arch=armhf,arm64]"; 32 $3 = "http://ports.ubuntu.com/ubuntu-ports/" 33 } 1' /etc/apt/sources.list | sudo tee /etc/apt/sources.list.d/ports.list > /dev/null 34 sudo sed -i 's/apt.postgresql.org/apt-archive.postgresql.org/' /etc/apt/sources.list 35 36 # downgrade Catch2 to 3.3.1 for successfully compiling with GCC 7 37 git -C ~/vcpkg fetch origin b28cddc45f5832fb46afaab11d61c9ccce50470a 38 git -C ~/vcpkg restore -s b28cddc45f5832fb46afaab11d61c9ccce50470a ports/catch2 39 40 install-deps() { 41 local arch="$1"; shift 42 local native=("$@" php-cli qemu-user-binfmt) 43 local target=( 44 libboost-dev libcurl4-openssl-dev libsqlite3-dev libssl-dev 45 libxml2-dev zlib1g-dev 46 ) 47 48 sudo dpkg --add-architecture $arch 49 sudo apt-get update -qq 50 sudo apt-get install -qq aptitude > /dev/null 51 sudo aptitude install -yR ${native[@]} ${target[@]/%/:$arch} > /dev/null 52 } 53 54 sudo update-alternatives --set gcc /usr/bin/gcc-7 55 sudo apt-get install -qq --allow-downgrades libstdc++6=8.4.0-1ubuntu1~18.04 > /dev/null 56 57 case $ARCH in 58 x86_64) 59 install-deps amd64 60 ;; 61 i686) 62 install-deps i386 g++-multilib 63 export TOOLCHAIN=$(pwd)/cmake/linux-cross.cmake \ 64 TOOLCHAIN_PREFIX=i386-linux-gnu 65 ;; 66 armv7l) 67 install-deps armhf g++-arm-linux-gnueabihf 68 export TOOLCHAIN=$(pwd)/cmake/linux-cross.cmake \ 69 TOOLCHAIN_PREFIX=arm-linux-gnueabihf 70 ;; 71 aarch64) 72 install-deps arm64 g++-aarch64-linux-gnu 73 export TOOLCHAIN=$(pwd)/cmake/linux-cross.cmake \ 74 TOOLCHAIN_PREFIX=aarch64-linux-gnu 75 ;; 76 esac 77 artifacts: 78 - path: build/reaper_reapack*.so 79 80 - matrix: { only: [ appveyor_build_worker_image: macos-bigsur, appveyor_build_worker_image: macos-mojave ] } 81 cache: 82 - build/vcpkg_installed -> vcpkg.json, cmake/vcpkg-triplets/arch-env.cmake 83 install: 84 - |- 85 case $ARCH in 86 arm64) 87 DEPLOY_TARGET=11.0 88 sudo xcode-select -s /Applications/Xcode-13.2.1.app 89 ;; 90 *) 91 DEPLOY_TARGET=10.9 92 export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.10.sdk 93 curl -fsSLO https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.10.sdk.tar.xz 94 echo 608a89db8b4be150a945871230b5ba5d4767a8500bc5fe76ddf10f5cec5ef513 MacOSX10.10.sdk.tar.xz | sha256sum -c 95 sudo tar xf MacOSX10.10.sdk.tar.xz -C /Library/Developer/CommandLineTools/SDKs 96 sudo xcode-select -s /Library/Developer/CommandLineTools 97 ;; 98 esac 99 100 # don't use LibXml2/SQLite3 from Mono 101 - sudo rm -r /Library/Frameworks/Mono.framework 102 103 - |- 104 if [ "$appveyor_build_worker_image" = "macos-mojave" ]; then 105 # https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/ 106 sudo curl -k https://curl.se/ca/cacert.pem -o /etc/ssl/cert.pem 107 108 # update to Catch2 v3 109 git -C ~/vcpkg fetch origin 50fe35a3c3ca43ffe3b436380cf563100406459a 110 git -C ~/vcpkg restore -s 50fe35a3c3ca43ffe3b436380cf563100406459a ports/catch2 111 fi 112 artifacts: 113 - path: build/reaper_reapack*.dylib 114 115 - matrix: { only: [ appveyor_build_worker_image: &windows Visual Studio 2022 ] } 116 cache: 117 - build\vcpkg_installed -> vcpkg.json, cmake\vcpkg-triplets\arm64ec-windows-static.cmake 118 install: 119 - if "%ARCH%" == "x64" call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" 120 - if "%ARCH%" == "x86" call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32.bat" 121 - if "%ARCH%" == "arm64ec" call "%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" 122 - if "%ARCH%" == "arm64ec" set CFLAGS=-arm64EC & set CXXFLAGS=-arm64EC 123 build_script: 124 - set VCPKG_OVERLAY_TRIPLETS=cmake\vcpkg-triplets 125 - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo 126 -DVCPKG_TARGET_TRIPLET=%ARCH%-windows-static 127 -DCMAKE_TOOLCHAIN_FILE=C:\Tools\vcpkg\scripts\buildsystems\vcpkg.cmake 128 - cmake --build build 129 artifacts: 130 - path: build\reaper_reapack*.dll 131 - path: build\reaper_reapack*.pdb 132 133 environment: 134 matrix: 135 - job_name: Windows x86 64-bit 136 appveyor_build_worker_image: *windows 137 ARCH: x64 138 - job_name: Windows x86 32-bit 139 appveyor_build_worker_image: *windows 140 ARCH: x86 141 - job_name: Windows ARM 64-bit EC 142 appveyor_build_worker_image: *windows 143 ARCH: arm64ec 144 - job_name: macOS x86 64-bit 145 appveyor_build_worker_image: macos-mojave 146 ARCH: x86_64 147 - job_name: macOS x86 32-bit 148 appveyor_build_worker_image: macos-mojave 149 ARCH: i386 150 - job_name: macOS ARM 64-bit 151 appveyor_build_worker_image: macos-bigsur 152 ARCH: arm64 153 - job_name: Linux x86 64-bit 154 appveyor_build_worker_image: *linux 155 ARCH: x86_64 156 - job_name: Linux x86 32-bit 157 appveyor_build_worker_image: *linux 158 ARCH: i686 159 - job_name: Linux ARM 64-bit 160 appveyor_build_worker_image: *linux 161 ARCH: aarch64 162 - job_name: Linux ARM 32-bit 163 appveyor_build_worker_image: *linux 164 ARCH: armv7l 165 166 deploy: 167 provider: GitHub 168 draft: true 169 description: '' 170 force_update: true 171 auth_token: 172 secure: 6dgJUqO2qAwADLQuvONd+mD5esFPBws7RA/3RSiEjrmquCsWpidm4ayawCPSEtfQ 173 artifact: /.*\.(dll|dylib|so)/ 174 on: 175 APPVEYOR_REPO_TAG: true