mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
put things in place for 32-bit testing and builds on both appveyor and travis
pray it doesn't shatter
This commit is contained in:
parent
1a64ba0fe5
commit
bfe696d2d7
36
.travis.yml
36
.travis.yml
|
@ -35,7 +35,7 @@ before_install:
|
||||||
script:
|
script:
|
||||||
- export SOL2_DIR=${TRAVIS_BUILD_DIR}
|
- export SOL2_DIR=${TRAVIS_BUILD_DIR}
|
||||||
- sudo docker image pull thephd/sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
- sudo docker image pull thephd/sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
||||||
- sudo docker run --rm --interactive --tty --name "sol2.test" -v "${SOL2_DIR}:/root/sol2" --env "CI=${CI}" --env "LUA_VERSION=${LUA_VERSION}" --env "GCC_VERSION=${GCC_VERSION}" --env "LLVM_VERSION=${LLVM_VERSION}" thephd/sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
- sudo docker run --rm --interactive --tty --name "sol2.test" -v "${SOL2_DIR}:/root/sol2" --env "CI=${CI}" --env "PLATFORM=${PLATFORM}" --env "LUA_VERSION=${LUA_VERSION}" --env "GCC_VERSION=${GCC_VERSION}" --env "LLVM_VERSION=${LLVM_VERSION}" thephd/sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
||||||
- sudo docker rmi $(sudo docker image ls -q)
|
- sudo docker rmi $(sudo docker image ls -q)
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -47,67 +47,67 @@ matrix:
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
GCC_VERSION=4.9
|
GCC_VERSION=4.9
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
GCC_VERSION=5
|
GCC_VERSION=5
|
||||||
CI=true
|
CI=true
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
GCC_VERSION=6
|
GCC_VERSION=6
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
# LLVM 3.6.x -> 5.0.x
|
# LLVM 3.6.x -> 5.0.x
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=3.6.2
|
LLVM_VERSION=3.6.2
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=3.7.1
|
LLVM_VERSION=3.7.1
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=3.8.1
|
LLVM_VERSION=3.8.1
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=3.9.1
|
LLVM_VERSION=3.9.1
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=4.0.1
|
LLVM_VERSION=4.0.1
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.3.4
|
- LUA_VERSION=5.3.4
|
||||||
LLVM_VERSION=5.0.1
|
LLVM_VERSION=5.0.1
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
ALLOW_FAILURE=true
|
ALLOW_FAILURE=true
|
||||||
|
|
||||||
|
@ -115,43 +115,43 @@ matrix:
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.2.4
|
- LUA_VERSION=5.2.4
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=5.1.5
|
- LUA_VERSION=5.1.5
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=luajit-2.0.4
|
- LUA_VERSION=luajit-2.0.4
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=luajit-2.0.5
|
- LUA_VERSION=luajit-2.0.5
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=luajit-2.1.0-beta3
|
- LUA_VERSION=luajit-2.1.0-beta3
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x64
|
PLATFORM=x64
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=luajit-2.0.5
|
- LUA_VERSION=luajit-2.0.5
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x86
|
PLATFORM=x86
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- LUA_VERSION=luajit-2.1.0-beta3
|
- LUA_VERSION=luajit-2.1.0-beta3
|
||||||
GCC_VERSION=7
|
GCC_VERSION=7
|
||||||
platform=x86
|
PLATFORM=x86
|
||||||
CI=true
|
CI=true
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
|
|
|
@ -59,6 +59,14 @@ if (MSVC)
|
||||||
add_compile_options(/MP)
|
add_compile_options(/MP)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
if (x86)
|
||||||
|
list(APPEND CMAKE_C_FLAGS "-m32")
|
||||||
|
list(APPEND CMAKE_CXX_FLAGS "-m32")
|
||||||
|
list(APPEND CMAKE_EXE_LINKER_FLAGS "-m32")
|
||||||
|
list(APPEND CMAKE_MODULE_LINKER_FLAGS "-m32")
|
||||||
|
list(APPEND CMAKE_STATIC_LINKER_FLAGS "-m32")
|
||||||
|
list(APPEND CMAKE_SHARED_LINKER_FLAGS "-m32")
|
||||||
|
endif()
|
||||||
add_compile_options(-Wno-unknown-warning -Wno-unknown-warning-option -Wall -Wextra -Wpedantic -pedantic -pedantic-errors)
|
add_compile_options(-Wno-unknown-warning -Wno-unknown-warning-option -Wall -Wextra -Wpedantic -pedantic -pedantic-errors)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -51,9 +51,10 @@ VOLUME /root/sol2
|
||||||
ARG CI=true
|
ARG CI=true
|
||||||
ARG GCC_VERSION
|
ARG GCC_VERSION
|
||||||
ARG LLVM_VERSION
|
ARG LLVM_VERSION
|
||||||
|
ARG PLATFORM=x64
|
||||||
|
|
||||||
# Potential environment variables
|
# Potential environment variables
|
||||||
ENV GCC_VERSION=${GCC_VERSION} LLVM_VERSION=${LLVM_VERSION} CI=${CI} SOL2_DIR=/root/sol2
|
ENV CI=${CI} PLATFORM=${PLATFORM} GCC_VERSION=${GCC_VERSION} LLVM_VERSION=${LLVM_VERSION} SOL2_DIR=/root/sol2
|
||||||
|
|
||||||
RUN ["/usr/bin/env", "zsh", "-e", "/root/sol2-scripts/preparation.linux.sh"]
|
RUN ["/usr/bin/env", "zsh", "-e", "/root/sol2-scripts/preparation.linux.sh"]
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,6 @@ matrix:
|
||||||
# Also does not have MinGW x64 for 5.3.0
|
# Also does not have MinGW x64 for 5.3.0
|
||||||
- image: Visual Studio 2017
|
- image: Visual Studio 2017
|
||||||
MINGW_VERSION: 6.3.0
|
MINGW_VERSION: 6.3.0
|
||||||
- platform: x86
|
|
||||||
MINGW_VERSION: 6.3.0
|
|
||||||
# LLVM exists in all images, and we only want the VS 2017 x64 versions
|
# LLVM exists in all images, and we only want the VS 2017 x64 versions
|
||||||
- image: Visual Studio 2015
|
- image: Visual Studio 2015
|
||||||
LLVM_VERSION: 4.0.0
|
LLVM_VERSION: 4.0.0
|
||||||
|
|
|
@ -52,25 +52,24 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "====== ======= ======= ======= ======"
|
echo "====== ======= ======= ======= ======"
|
||||||
echo "====== Pushing All Docker Images ======"
|
echo "====== Building All Docker Images ======"
|
||||||
echo "====== ======= ======= ======= ======"
|
echo "====== ======= ======= ======= ======"
|
||||||
|
|
||||||
for i in $gcc_versions; do
|
for i in $gcc_versions; do
|
||||||
GCC_VERSION=$i
|
GCC_VERSION=$i
|
||||||
unset LLVM_VERSION
|
unset LLVM_VERSION
|
||||||
echo "====== Pushing Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
echo "====== Building Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
||||||
docker push ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
docker build --tag ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} --build-arg GCC_VERSION=${GCC_VERSION} --build-arg LLVM_VERSION=${LLVM_VERSION} --build-arg CI=${CI} "${SOL2_DIR}"
|
||||||
done
|
done
|
||||||
|
|
||||||
for i in $llvm_versions; do
|
for i in $llvm_versions; do
|
||||||
LLVM_VERSION=$i
|
LLVM_VERSION=$i
|
||||||
unset GCC_VERSION
|
unset GCC_VERSION
|
||||||
echo "====== Pushing Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
echo "====== Building Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
||||||
docker push ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
docker build --tag ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} --build-arg GCC_VERSION=${GCC_VERSION} --build-arg LLVM_VERSION=${LLVM_VERSION} --build-arg CI=${CI} "${SOL2_DIR}"
|
||||||
done
|
done
|
||||||
|
|
||||||
unset LLVM_VERSION
|
unset LLVM_VERSION
|
||||||
unset GCC_VERSION
|
unset GCC_VERSION
|
||||||
echo "====== Pushing Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
echo "====== Building Docker Image: ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} ======="
|
||||||
docker push ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION}
|
docker build --tag ${docker_username}sol2:gcc-${GCC_VERSION}_llvm-${LLVM_VERSION} --build-arg GCC_VERSION=${GCC_VERSION} --build-arg LLVM_VERSION=${LLVM_VERSION} --build-arg CI=${CI} "${SOL2_DIR}"
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ build_dir="$(pwd)"
|
||||||
echo "#\!/usr/bin/env zsh\n\n" > "sol2.compiler.vars"
|
echo "#\!/usr/bin/env zsh\n\n" > "sol2.compiler.vars"
|
||||||
|
|
||||||
# # Initial and necessary installations
|
# # Initial and necessary installations
|
||||||
apt-get -y install ninja-build libreadline6 libreadline6-dev python3 wget curl libcurl3 cmake git
|
apt-get update && apt-get -y install ninja-build libreadline6 libreadline6-dev lib32readline6 lib32readline6-dev python3 wget curl libcurl3 cmake git
|
||||||
|
|
||||||
# # LLVM and GCC updates
|
# # LLVM and GCC updates
|
||||||
# Grab LLVM or GCC
|
# Grab LLVM or GCC
|
||||||
|
@ -93,13 +93,13 @@ then
|
||||||
add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
||||||
apt-get -y update
|
apt-get -y update
|
||||||
apt-get -y dist-upgrade
|
apt-get -y dist-upgrade
|
||||||
apt-get -y install gcc-$GCC_VERSION g++-$GCC_VERSION
|
apt-get -y install gcc-${GCC_VERSION} g++-${GCC_VERSION} gcc-${GCC_VERSION}-multilib g++-${GCC_VERSION}-multilib
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 60 --slave /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION
|
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 60 --slave /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION}
|
||||||
update-alternatives --config gcc
|
update-alternatives --config gcc
|
||||||
export CC=gcc-$GCC_VERSION
|
export CC=gcc-${GCC_VERSION}
|
||||||
export CXX=g++-$GCC_VERSION
|
export CXX=g++-${GCC_VERSION}
|
||||||
else
|
else
|
||||||
apt-get -y install build-essential
|
apt-get -y install build-essential gcc-multilib g++-multilib
|
||||||
export CC=cc
|
export CC=cc
|
||||||
export CXX=c++
|
export CXX=c++
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -70,7 +70,7 @@ echo -en "travis_fold:end:build_preparation.2\r"
|
||||||
|
|
||||||
echo -en "travis_fold:start:build.debug\r"
|
echo -en "travis_fold:start:build.debug\r"
|
||||||
cd Debug
|
cd Debug
|
||||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Debug ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Debug ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -D${PLATFORM}=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||||
cmake --build . --config Debug
|
cmake --build . --config Debug
|
||||||
echo -en "travis_fold:end:build.debug\r"
|
echo -en "travis_fold:end:build.debug\r"
|
||||||
echo -en "travis_fold:start:test.debug\r"
|
echo -en "travis_fold:start:test.debug\r"
|
||||||
|
@ -80,7 +80,7 @@ echo -en "travis_fold:end:test.debug\r"
|
||||||
|
|
||||||
echo "travis_fold:start:build.release\r"
|
echo "travis_fold:start:build.release\r"
|
||||||
cd Release
|
cd Release
|
||||||
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
cmake ${SOL2_DIR} -G Ninja -DCMAKE_BUILD_TYPE=Release ${build_type_cc} ${build_type_cxx} -DLUA_VERSION="${LUA_VERSION}" -DCI=ON -D${PLATFORM}=ON -DBUILD_LUA=ON -DBUILD_LUA_AS_DLL=OFF -DTESTS=ON -DEXAMPLES=ON -DSINGLE=ON -DTESTS_EXAMPLES=ON -DEXAMPLES_SINGLE=ON -DTESTS_SINGLE=ON
|
||||||
cmake --build . --config Release
|
cmake --build . --config Release
|
||||||
echo -en "travis_fold:end:build.release\r"
|
echo -en "travis_fold:end:build.release\r"
|
||||||
echo -en "travis_fold:start:test.release\r"
|
echo -en "travis_fold:start:test.release\r"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user