mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor(CI): Rename Windows cross compile builds to match cmake types
Debug and Release with capital letters are consistent with all our other CI script build type names as well as cmake build types.
This commit is contained in:
parent
40b339b367
commit
46ef31293c
4
.github/workflows/build-test-deploy.yaml
vendored
4
.github/workflows/build-test-deploy.yaml
vendored
|
@ -353,7 +353,7 @@ jobs:
|
||||||
contents: write
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [debug, release]
|
build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./.github/actions/load-docker-image
|
- uses: ./.github/actions/load-docker-image
|
||||||
|
@ -433,7 +433,7 @@ jobs:
|
||||||
contents: write
|
contents: write
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
build_type: [debug, release]
|
build_type: [Debug, Release]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./.github/actions/load-docker-image
|
- uses: ./.github/actions/load-docker-image
|
||||||
|
|
|
@ -10,5 +10,5 @@ $ docker compose run windows_builder
|
||||||
# mkdir build-windows
|
# mkdir build-windows
|
||||||
# cd build-windows
|
# cd build-windows
|
||||||
# # Example is using --arch x86_64, --arch i686 should be used if you are in the i686 docker image
|
# # Example is using --arch x86_64, --arch i686 should be used if you are in the i686 docker image
|
||||||
# /qtox/windows/cross-compile/build.sh --src-dir /qtox --arch x86_64 --build-type release
|
# /qtox/windows/cross-compile/build.sh --src-dir /qtox --arch x86_64 --build-type Release
|
||||||
```
|
```
|
||||||
|
|
|
@ -68,18 +68,18 @@ fi
|
||||||
|
|
||||||
if [ -z "$BUILD_TYPE" ]
|
if [ -z "$BUILD_TYPE" ]
|
||||||
then
|
then
|
||||||
echo "Error: No build type was specified. Please specify either 'release' or 'debug', case sensitive, as the second argument to the script."
|
echo "Error: No build type was specified. Please specify either 'Release' or 'Debug', case sensitive, as the second argument to the script."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" != "release" ]] && [[ "$BUILD_TYPE" != "debug" ]]
|
if [[ "$BUILD_TYPE" != "Release" ]] && [[ "$BUILD_TYPE" != "Debug" ]]
|
||||||
then
|
then
|
||||||
echo "Error: Incorrect build type was specified. Please specify either 'release' or 'debug', case sensitive, as the second argument to the script."
|
echo "Error: Incorrect build type was specified. Please specify either 'Release' or 'Debug', case sensitive, as the second argument to the script."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Spell check on windows currently not supported, disable
|
# Spell check on windows currently not supported, disable
|
||||||
if [[ "$BUILD_TYPE" == "release" ]]
|
if [[ "$BUILD_TYPE" == "Release" ]]
|
||||||
then
|
then
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
|
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
|
||||||
-DCMAKE_PREFIX_PATH=/windows \
|
-DCMAKE_PREFIX_PATH=/windows \
|
||||||
|
@ -90,7 +90,7 @@ then
|
||||||
-DSTRICT_OPTIONS=ON \
|
-DSTRICT_OPTIONS=ON \
|
||||||
-DTEST_CROSSCOMPILING_EMULATOR=wine \
|
-DTEST_CROSSCOMPILING_EMULATOR=wine \
|
||||||
"$QTOX_SRC_DIR"
|
"$QTOX_SRC_DIR"
|
||||||
elif [[ "$BUILD_TYPE" == "debug" ]]
|
elif [[ "$BUILD_TYPE" == "Debug" ]]
|
||||||
then
|
then
|
||||||
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
|
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
|
||||||
-DCMAKE_PREFIX_PATH=/windows \
|
-DCMAKE_PREFIX_PATH=/windows \
|
||||||
|
@ -122,7 +122,7 @@ set -u
|
||||||
|
|
||||||
# Strip
|
# Strip
|
||||||
set +e
|
set +e
|
||||||
if [[ "$BUILD_TYPE" == "release" ]]
|
if [[ "$BUILD_TYPE" == "Release" ]]
|
||||||
then
|
then
|
||||||
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*.exe
|
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*.exe
|
||||||
fi
|
fi
|
||||||
|
@ -130,7 +130,7 @@ $ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*.dll
|
||||||
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*/*.dll
|
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*/*.dll
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [[ "$BUILD_TYPE" == "debug" ]]
|
if [[ "$BUILD_TYPE" == "Debug" ]]
|
||||||
then
|
then
|
||||||
cp -r /debug_export/* ${QTOX_PREFIX_DIR}
|
cp -r /debug_export/* ${QTOX_PREFIX_DIR}
|
||||||
fi
|
fi
|
||||||
|
@ -141,7 +141,7 @@ zip qtox-"$ARCH"-"$BUILD_TYPE".zip -r *
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Create installer
|
# Create installer
|
||||||
if [[ "$BUILD_TYPE" == "release" ]]
|
if [[ "$BUILD_TYPE" == "Release" ]]
|
||||||
then
|
then
|
||||||
mkdir -p $QTOX_PACKAGE_DIR
|
mkdir -p $QTOX_PACKAGE_DIR
|
||||||
pushd $QTOX_PACKAGE_DIR
|
pushd $QTOX_PACKAGE_DIR
|
||||||
|
|
Loading…
Reference in New Issue
Block a user