[Build] Implement CI for MacOS via appveyor (#1013)

This commit is contained in:
Harsha Raghu 2021-10-25 05:52:56 +05:30 committed by GitHub
parent e6d9d9b71c
commit 5dcda02b65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,32 +1,126 @@
version: 1.0.{build} version: 1.0.{build}
clone_folder: c:\projects\amxmodx
install: environment:
- git submodule update --init --recursive fast_finish: false
- 'c:' allow_failures: true
- mkdir c:\nasm matrix:
- set PATH=c:\nasm\nasm-2.13.03;%PATH% - job_name: MacOS
- curl -L -o "c:\nasm\nasm.zip" https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip appveyor_build_worker_image: macos-mojave
- chdir c:\nasm job_group: Build
- 7z x nasm.zip
- chdir c:\projects - job_name: Windows
- git clone https://github.com/alliedmodders/ambuild appveyor_build_worker_image: Visual Studio 2015
- git clone https://github.com/alliedmodders/metamod-hl1 job_group: Build
- git clone https://github.com/alliedmodders/hlsdk
- ps: Start-FileDownload 'https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.1-win32.zip' for:
- 7z x mysql-connector-c-6.1.1-win32.zip -o"mysql" -
- cd mysql matrix:
- dir only:
- ren mysql-connector-c-6.1.1-win32 mysql-5.5 - job_name: Windows
- move /Y mysql-5.5 ..\
- cd ..\ambuild clone_folder: c:\projects\amxmodx
- c:\python27\python setup.py install install:
- cd ..\amxmodx - cmd: >-
cache: git submodule update --init --recursive
- c:\projects\*.zip -> appveyor.yml
- c:\projects\mysql-5.5 -> appveyor.yml c:
build_script:
- '"%VS140COMNTOOLS%\vsvars32.bat"' mkdir c:\nasm
- mkdir build
- cd build set PATH=c:\nasm\nasm-2.13.03;%PATH%
- c:\python27\python ../configure.py --enable-optimize --nasm="C:\nasm\nasm-2.13.03\nasm.exe"
- ambuild curl -L -o "c:\nasm\nasm.zip" https://www.nasm.us/pub/nasm/releasebuilds/2.13.03/win32/nasm-2.13.03-win32.zip
chdir c:\nasm
7z x nasm.zip
chdir c:\projects
git clone https://github.com/alliedmodders/ambuild
git clone https://github.com/alliedmodders/metamod-hl1
git clone https://github.com/alliedmodders/hlsdk
curl -L -o "mysql-connector-c-6.1.1-win32.zip" https://downloads.mysql.com/archives/get/p/19/file/mysql-connector-c-6.1.1-win32.zip
7z x mysql-connector-c-6.1.1-win32.zip -o"mysql"
cd mysql
dir
ren mysql-connector-c-6.1.1-win32 mysql-5.5
move /Y mysql-5.5 ..\
cd ..\ambuild
c:\python38\python setup.py install
set PATH=C:\Python38;C:\Python38\Scripts;%PATH%
cd ..\amxmodx
# cache:
# - c:\projects\*.zip -> appveyor.yml
# - c:\projects\mysql-5.5 -> appveyor.yml
build_script:
- cmd: >-
"%VS140COMNTOOLS%\vsvars32.bat"
mkdir build
cd build
c:\python38\python ../configure.py --enable-optimize --nasm="C:\nasm\nasm-2.13.03\nasm.exe"
echo %PATH%
ambuild
-
matrix:
only:
- job_name: MacOS
install:
- >-
git submodule update --init --recursive
mkdir -p $APPVEYOR_BUILD_FOLDER/deps
ls -alh
cd $APPVEYOR_BUILD_FOLDER/deps
mkdir -p amxmodx
../support/checkout-deps.sh
brew install nasm
nasm -v
export CC=clang
export CXX=clang++
clang --version
clang++ --version
cd $APPVEYOR_BUILD_FOLDER
build_script:
- >-
echo $PATH
mkdir build
cd build
python3 ../configure.py --enable-optimize --metamod=$APPVEYOR_BUILD_FOLDER/deps/metamod-am --hlsdk=$APPVEYOR_BUILD_FOLDER/deps/hlsdk --mysql=$APPVEYOR_BUILD_FOLDER/deps/mysql-5.5
ambuild