Test macOS universal build

This commit is contained in:
Luke Street 2021-02-21 10:09:21 -05:00
parent ba69a0dc29
commit 8a970cbdba
2 changed files with 144 additions and 153 deletions

View File

@ -2,10 +2,56 @@
variables: &build_variables
GIT_SUBMODULE_STRATEGY: recursive
#.build:macos: &macos_definition
build:macos:universal:
stage: build
tags:
- macos
- arm64
variables:
<<: *build_variables
script:
- mkdir build-{arm64,x86_64}
- cd build-arm64
- >
cmake
-GNinja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DURDE_DLPACKAGE=urde-$CI_PIPELINE_ID-macos-universal
..
- ninja urde hecl visigen
- cd ../build-x86_64
- >
cmake
-GNinja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_APPLE_SILICON_PROCESSOR=x86_64
-DURDE_DLPACKAGE=urde-$CI_PIPELINE_ID-macos-universal
-DURDE_VECTOR_ISA=avx2
..
- ninja urde hecl visigen
- cd Binaries
- cp -R urde.app $CI_PROJECT_DIR/URDE.app
- cd $CI_PROJECT_DIR
- lipo -create -output URDE.app/Contents/MacOS/urde build-{x86_64,arm64}/Binaries/urde.app/Contents/MacOS/urde
- lipo -create -output URDE.app/Contents/MacOS/hecl build-{x86_64,arm64}/Binaries/urde.app/Contents/MacOS/hecl
- lipo -create -output URDE.app/Contents/MacOS/visigen build-{x86_64,arm64}/Binaries/urde.app/Contents/MacOS/visigen
- strip -S -o URDE.app/Contents/MacOS/urde URDE.app/Contents/MacOS/urde
- strip -S -o URDE.app/Contents/MacOS/hecl URDE.app/Contents/MacOS/hecl
- strip -S -o URDE.app/Contents/MacOS/visigen URDE.app/Contents/MacOS/visigen
- (if [ "${URDE_MACOS_CODESIGN_UID}" != "" ]; then codesign -s $URDE_MACOS_CODESIGN_UID --deep URDE.app; else echo "Unable to sign app bundle :("; fi);
only:
- release
- dev
artifacts:
name: "urde-$CI_PIPELINE_ID-macos-universal"
paths:
- URDE.app/
expire_in: 1 week
#.build:linux: &linux_definition
# stage: build
# tags:
# - macos
# - linux
# script:
# - mkdir build
# - cd build
@ -13,175 +59,120 @@
# cmake
# -GNinja
# -DCMAKE_BUILD_TYPE=RelWithDebInfo
# -DURDE_DLPACKAGE=urde-$CI_PIPELINE_ID-macos-x86_64-$URDE_VECTOR_ISA
# -DURDE_DLPACKAGE=urde-$CI_PIPELINE_ID-linux-x86_64-$URDE_VECTOR_ISA
# -DURDE_VECTOR_ISA=$URDE_VECTOR_ISA
# ..
# - ninja urde hecl visigen
# - cd Binaries
# - cp -R urde.app $CI_PROJECT_DIR/URDE.app
# - cd $CI_PROJECT_DIR
# - strip -S -o URDE.app/Contents/MacOS/urde URDE.app/Contents/MacOS/urde
# - strip -S -o URDE.app/Contents/MacOS/hecl URDE.app/Contents/MacOS/hecl
# - strip -S -o URDE.app/Contents/MacOS/visigen URDE.app/Contents/MacOS/visigen
# - (if [ "${URDE_MACOS_CODESIGN_UID}" != "" ]; then codesign -s $URDE_MACOS_CODESIGN_UID --deep URDE.app; else echo "Unable to sign app bundle :("; fi);
# - nice -n19 ninja -j8 urde hecl visigen
# - cp Binaries/urde $CI_PROJECT_DIR
# - strip --strip-debug -o $CI_PROJECT_DIR/urde Binaries/urde
# - rm -r $CI_PROJECT_DIR/hecl
# - strip --strip-debug -o $CI_PROJECT_DIR/hecl Binaries/hecl
# - rm -r $CI_PROJECT_DIR/visigen
# - strip --strip-debug -o $CI_PROJECT_DIR/visigen Binaries/visigen
# only:
# - release
# - release
# - dev
# artifacts:
# name: "urde-$CI_PIPELINE_ID-macos-x86_64-$URDE_VECTOR_ISA"
# name: "urde-$CI_PIPELINE_ID-linux-x86_64-$URDE_VECTOR_ISA"
# paths:
# - URDE.app/
# - urde
# - hecl
# - visigen
# expire_in: 1 week
#build:macos:sse3:
# <<: *macos_definition
#
#build:linux:sse3:
# <<: *linux_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: sse3
#build:macos:sse41:
# <<: *macos_definition
#
#build:linux:sse41:
# <<: *linux_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: sse41
#build:macos:avx:
# <<: *macos_definition
#
#build:linux:avx:
# <<: *linux_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: avx
#build:macos:avx2:
# <<: *macos_definition
#
#build:linux:avx2:
# <<: *linux_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: avx2
#
#.build:win32: &win32_definition
# stage: build
# tags:
# - win32
# script:
# - cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
# - >
# Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
# if ($_ -match "^(.*?)=(.*)$") {
# Set-Content "env:\$($matches[1])" $matches[2]
# }
# }
# - mkdir build
# - cd build
# - >
# cmake
# -GNinja
# -DCMAKE_BUILD_TYPE=RelWithDebInfo
# -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
# -DURDE_DLPACKAGE="urde-$env:CI_PIPELINE_ID-win32-x86_64-$env:URDE_VECTOR_ISA"
# -DURDE_VECTOR_ISA="$env:URDE_VECTOR_ISA"
# -DLLVM_ROOT_DIR=C:\projects\deps\llvm
# -DCMAKE_C_FLAGS=
# -DCMAKE_CXX_FLAGS=
# ..
# - ninja urde hecl visigen
# - 'copy Binaries\urde.exe "$env:CI_PROJECT_DIR\urde.exe"'
# - 'pdbcopy Binaries\urde.pdb "$env:CI_PROJECT_DIR\urde.pdb" -p'
# - 'copy Binaries\hecl.exe "$env:CI_PROJECT_DIR\hecl.exe"'
# - 'pdbcopy Binaries\hecl.pdb "$env:CI_PROJECT_DIR\hecl.pdb" -p'
# - 'copy Binaries\visigen.exe "$env:CI_PROJECT_DIR\visigen.exe"'
# - 'pdbcopy Binaries\visigen.pdb "$env:CI_PROJECT_DIR\visigen.pdb" -p'
# only:
# - release
# - dev
# artifacts:
# name: "urde-$env:CI_PIPELINE_ID-win32-x86_64-$env:URDE_VECTOR_ISA"
# paths:
# - urde.exe
# - urde.pdb
# - hecl.exe
# - hecl.pdb
# - visigen.exe
# - visigen.pdb
# expire_in: 1 week
#
#build:win32:sse2:
# <<: *win32_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: sse2
#
#build:win32:sse41:
# <<: *win32_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: sse41
#
#build:win32:avx:
# <<: *win32_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: avx
#
#build:win32:avx2:
# <<: *win32_definition
# variables:
# <<: *build_variables
# URDE_VECTOR_ISA: avx2
.build:linux: &linux_definition
stage: build
tags:
- linux
script:
- mkdir build
- cd build
- >
cmake
-GNinja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DURDE_DLPACKAGE=urde-$CI_PIPELINE_ID-linux-x86_64-$URDE_VECTOR_ISA
-DURDE_VECTOR_ISA=$URDE_VECTOR_ISA
..
- nice -n19 ninja -j8 urde hecl visigen
- cp Binaries/urde $CI_PROJECT_DIR
- strip --strip-debug -o $CI_PROJECT_DIR/urde Binaries/urde
- rm -r $CI_PROJECT_DIR/hecl
- strip --strip-debug -o $CI_PROJECT_DIR/hecl Binaries/hecl
- rm -r $CI_PROJECT_DIR/visigen
- strip --strip-debug -o $CI_PROJECT_DIR/visigen Binaries/visigen
only:
- release
- dev
artifacts:
name: "urde-$CI_PIPELINE_ID-linux-x86_64-$URDE_VECTOR_ISA"
paths:
- urde
- hecl
- visigen
expire_in: 1 week
build:linux:sse3:
<<: *linux_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: sse3
build:linux:sse41:
<<: *linux_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: sse41
build:linux:avx:
<<: *linux_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: avx
build:linux:avx2:
<<: *linux_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: avx2
.build:win32: &win32_definition
stage: build
tags:
- win32
script:
- cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
- >
Get-Content "$env:temp\vcvars.txt" | Foreach-Object {
if ($_ -match "^(.*?)=(.*)$") {
Set-Content "env:\$($matches[1])" $matches[2]
}
}
- mkdir build
- cd build
- >
cmake
-GNinja
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
-DURDE_DLPACKAGE="urde-$env:CI_PIPELINE_ID-win32-x86_64-$env:URDE_VECTOR_ISA"
-DURDE_VECTOR_ISA="$env:URDE_VECTOR_ISA"
-DLLVM_ROOT_DIR=C:\projects\deps\llvm
-DCMAKE_C_FLAGS=
-DCMAKE_CXX_FLAGS=
..
- ninja urde hecl visigen
- 'copy Binaries\urde.exe "$env:CI_PROJECT_DIR\urde.exe"'
- 'pdbcopy Binaries\urde.pdb "$env:CI_PROJECT_DIR\urde.pdb" -p'
- 'copy Binaries\hecl.exe "$env:CI_PROJECT_DIR\hecl.exe"'
- 'pdbcopy Binaries\hecl.pdb "$env:CI_PROJECT_DIR\hecl.pdb" -p'
- 'copy Binaries\visigen.exe "$env:CI_PROJECT_DIR\visigen.exe"'
- 'pdbcopy Binaries\visigen.pdb "$env:CI_PROJECT_DIR\visigen.pdb" -p'
only:
- release
- dev
artifacts:
name: "urde-$env:CI_PIPELINE_ID-win32-x86_64-$env:URDE_VECTOR_ISA"
paths:
- urde.exe
- urde.pdb
- hecl.exe
- hecl.pdb
- visigen.exe
- visigen.pdb
expire_in: 1 week
build:win32:sse2:
<<: *win32_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: sse2
build:win32:sse41:
<<: *win32_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: sse41
build:win32:avx:
<<: *win32_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: avx
build:win32:avx2:
<<: *win32_definition
variables:
<<: *build_variables
URDE_VECTOR_ISA: avx2
deploy:
stage: deploy

2
hecl

@ -1 +1 @@
Subproject commit c53569993cbee89a809f8546dbad4bac20b1f500
Subproject commit 7522e9f41470c5de3d44be849348effa28540c33