forked from Unity-Technologies/crunch
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add windows, linux and macos build
- Loading branch information
Showing
3 changed files
with
121 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Documentation: https://wiki.unvanquished.net/wiki/Continuous_integration | ||
|
||
skip_branch_with_pr: true | ||
|
||
only_commits: | ||
files: | ||
- .appveyor.yml | ||
- example1/ | ||
- example2/ | ||
- example3/ | ||
# The rest of this list should stay in sync with azure-pipelines.yml | ||
- crunch/ | ||
- crnlib/ | ||
- inc/ | ||
- CMakeLists.txt | ||
|
||
environment: | ||
matrix: | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
generator: Visual Studio 16 2019 | ||
platform: x64 | ||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 | ||
generator: Visual Studio 16 2019 | ||
platform: win32 | ||
|
||
build: | ||
parallel: true | ||
|
||
build_script: | ||
# simple line break: space | ||
# double line break: line break | ||
|
||
# The CFLAGS/CXXFLAGS env vars *prepend* to CMAKE_<lang>_FLAGS rather than overwriting. | ||
# /Wv pins warnings to a specific compiler version so that new ones | ||
# don't make the build error after Appveyor updates the compiler. | ||
- cmd: > | ||
echo %NUMBER_OF_PROCESSORS% | ||
set CMAKE_BUILD_PARALLEL_LEVEL=%NUMBER_OF_PROCESSORS% | ||
cmake --version | ||
set CFLAGS=/Wv:19.29.30037 | ||
set CXXFLAGS=/Wv:19.29.30037 | ||
cmake | ||
-Wdev -Wdeprecated | ||
-G"%generator%" -A"%platform%" | ||
-DBUILD_CRUNCH=ON -DBUILD_SHARED_LIBCRN=ON -DBUILD_EXAMPLES=ON | ||
-S. -Bbuild | ||
cmake --build build --config Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Documentation: https://wiki.unvanquished.net/wiki/Continuous_integration | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- master | ||
|
||
pr: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
include: | ||
- azure-pipelines.yml | ||
# The rest of this list should stay in sync with .appveyor.yml | ||
- crunch/ | ||
- crnlib/ | ||
- inc/ | ||
- CMakeLists.txt | ||
|
||
strategy: | ||
matrix: | ||
Linux GCC: | ||
VM_IMAGE: 'ubuntu-20.04' | ||
C_COMPILER: gcc-8 | ||
CXX_COMPILER: g++-8 | ||
EXTRA_PACKAGES: ninja-build gcc-8 g++-8 | ||
INSTALL_TOOL: 'sudo apt-get update && sudo apt-get -y -q --no-install-recommends install' | ||
NPROC_TOOL: 'nproc' | ||
Linux Clang: | ||
VM_IMAGE: 'ubuntu-20.04' | ||
C_COMPILER: clang | ||
CXX_COMPILER: clang++ | ||
EXTRA_PACKAGES: ninja-build gcc-8 g++-8 | ||
INSTALL_TOOL: 'sudo apt-get update && sudo apt-get -y -q --no-install-recommends install' | ||
NPROC_TOOL: 'nproc' | ||
MinGW: | ||
VM_IMAGE: 'ubuntu-20.04' | ||
C_COMPILER: x86_64-w64-mingw32-gcc | ||
CXX_COMPILER: x86_64-w64-mingw32-g++ | ||
EXTRA_PACKAGES: gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64-x86-64-dev | ||
INSTALL_TOOL: 'sudo apt-get update && sudo apt-get -y -q --no-install-recommends install' | ||
EXTRA_INSTALLS: sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix ; sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix | ||
NPROC_TOOL: 'nproc' | ||
Mac: | ||
VM_IMAGE: 'macOS-12' | ||
C_COMPILER: clang | ||
CXX_COMPILER: clang++ | ||
BUILDER_OPTIONS: '-k 10' | ||
NPROC_TOOL: 'sysctl -n hw.logicalcpu' | ||
|
||
pool: | ||
vmImage: $(VM_IMAGE) | ||
|
||
steps: | ||
- bash: | | ||
set -xe | ||
[ -n "${EXTRA_PACKAGES:-}" ] && ${INSTALL_TOOL} ${EXTRA_PACKAGES} | ||
[ -n "${EXTRA_INSTALLS:-}" ] && ${EXTRA_INSTALLS} | ||
displayName: 'Setup' | ||
- bash: | | ||
set -xe | ||
export CMAKE_BUILD_PARALLEL_LEVEL="$(${NPROC_TOOL})" | ||
echo "${CMAKE_BUILD_PARALLEL_LEVEL}" | ||
cmake -GNinja -S. -Bbuild -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} \ | ||
-DBUILD_CRUNCH=ON -DBUILD_SHARED_LIBCRN=ON -DBUILD_EXAMPLES=OFF | ||
cmake --build build --config Release -- -k 0 | ||
displayName: 'Build' |