Update build.yaml

This commit is contained in:
Andrea Cavalli 2020-12-26 12:16:14 +01:00
parent e4e8f62238
commit b9a3753c03

View File

@ -8,12 +8,16 @@ on:
jobs: jobs:
build: build:
runs-on: [ubuntu-20.04, windows-2019, macos-10.15]
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, macos-10.15]
arch: [linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/ppc64le, windows/amd64, macos/amd64] arch: [linux/386, linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64, linux/ppc64le, windows/amd64, macos/amd64]
runs-on: ${{ matrix.os }}
steps: steps:
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup variables - name: Setup variables
run: | run: |
# ====== Variables # ====== Variables
@ -76,14 +80,10 @@ jobs:
export VCPKG_DIR="$(realpath .)/vcpkg" export VCPKG_DIR="$(realpath .)/vcpkg"
export CMAKE_EXTRA_ARGUMENTS="-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON" export CMAKE_EXTRA_ARGUMENTS="-A x64 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$VCPKG_DIR/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DOPENSSL_USE_STATIC_LIBS=ON"
export PATH="/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM" export PATH="/c/Python3:$PATH:/c/tools/php74:/c/PHP:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64:/c/Program Files/OpenJDK/openjdk-11.0.8_10/bin:/c/Program Files/CMake/bin:/c/ProgramData/chocolatey/bin:/c/Program Files/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/maven/apache-maven-3.6.3/bin:/c/ProgramData/chocolatey/lib/base64/tools:/c/Program Files/NASM"
export JAVA_HOME="/c/Program Files/OpenJDK/openjdk-11.0.8_10"
export CPU_CORES=" -- -m" export CPU_CORES=" -- -m"
export CMAKE_BUILD_TYPE=Release export CMAKE_BUILD_TYPE=Release
elif [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then elif [[ "$OPERATING_SYSTEM_NAME" == "osx" ]]; then
export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/" export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/"
export PATH="$PATH:$(/usr/libexec/java_home -v 14)"
export JAVA_HOME="$(/usr/libexec/java_home -v 14)"
export JAVA_INCLUDE_PATH="$(/usr/libexec/java_home -v 14)/include"
export CPU_CORES=" -- -j${CPU_CORES_NUM}" export CPU_CORES=" -- -j${CPU_CORES_NUM}"
elif [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then elif [[ "$OPERATING_SYSTEM_NAME" == "linux" ]]; then
if [[ "$CPU_ARCHITECTURE_NAME" = "aarch64" ]]; then if [[ "$CPU_ARCHITECTURE_NAME" = "aarch64" ]]; then
@ -93,9 +93,6 @@ jobs:
export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\"" export CMAKE_EXTRA_ARGUMENTS="-DOPENSSL_USE_STATIC_LIBS=ON -DCMAKE_FIND_LIBRARY_SUFFIXES=\".a\""
export CXXFLAGS="-static-libgcc -static-libstdc++" export CXXFLAGS="-static-libgcc -static-libstdc++"
fi fi
export PATH="$PATH:/usr/lib/jvm/java-11-openjdk-$CPU_ARCH_JAVA/bin"
export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$CPU_ARCH_JAVA"
export JAVA_INCLUDE_PATH="/usr/lib/jvm/java-11-openjdk-$CPU_ARCH_JAVA/include"
export CPU_CORES=" -- -j${CPU_CORES_NUM}" export CPU_CORES=" -- -j${CPU_CORES_NUM}"
export CC="/usr/bin/clang-10" export CC="/usr/bin/clang-10"
export CXX="/usr/bin/clang++-10" export CXX="/usr/bin/clang++-10"