Skip to content

Commit

Permalink
refactor(CI): Rename Windows cross compile builds to match cmake types
Browse files Browse the repository at this point in the history
Debug and Release with capital letters are consistent with all our other CI
script build type names as well as cmake build types.
  • Loading branch information
anthonybilinski committed May 22, 2022
1 parent 40b339b commit 46ef312
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ jobs:
contents: write
strategy:
matrix:
build_type: [debug, release]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/load-docker-image
Expand Down Expand Up @@ -433,7 +433,7 @@ jobs:
contents: write
strategy:
matrix:
build_type: [debug, release]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/load-docker-image
Expand Down
2 changes: 1 addition & 1 deletion windows/cross-compile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ $ docker compose run windows_builder
# mkdir build-windows
# cd build-windows
# # 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
```
16 changes: 8 additions & 8 deletions windows/cross-compile/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,18 @@ fi

if [ -z "$BUILD_TYPE" ]
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
fi

if [[ "$BUILD_TYPE" != "release" ]] && [[ "$BUILD_TYPE" != "debug" ]]
if [[ "$BUILD_TYPE" != "Release" ]] && [[ "$BUILD_TYPE" != "Debug" ]]
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
fi

# Spell check on windows currently not supported, disable
if [[ "$BUILD_TYPE" == "release" ]]
if [[ "$BUILD_TYPE" == "Release" ]]
then
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
-DCMAKE_PREFIX_PATH=/windows \
Expand All @@ -90,7 +90,7 @@ then
-DSTRICT_OPTIONS=ON \
-DTEST_CROSSCOMPILING_EMULATOR=wine \
"$QTOX_SRC_DIR"
elif [[ "$BUILD_TYPE" == "debug" ]]
elif [[ "$BUILD_TYPE" == "Debug" ]]
then
cmake -DCMAKE_TOOLCHAIN_FILE=/build/windows-toolchain.cmake \
-DCMAKE_PREFIX_PATH=/windows \
Expand Down Expand Up @@ -122,15 +122,15 @@ set -u

# Strip
set +e
if [[ "$BUILD_TYPE" == "release" ]]
if [[ "$BUILD_TYPE" == "Release" ]]
then
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*.exe
fi
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*.dll
$ARCH-w64-mingw32-strip -s $QTOX_PREFIX_DIR/*/*.dll
set -e

if [[ "$BUILD_TYPE" == "debug" ]]
if [[ "$BUILD_TYPE" == "Debug" ]]
then
cp -r /debug_export/* ${QTOX_PREFIX_DIR}
fi
Expand All @@ -141,7 +141,7 @@ zip qtox-"$ARCH"-"$BUILD_TYPE".zip -r *
popd

# Create installer
if [[ "$BUILD_TYPE" == "release" ]]
if [[ "$BUILD_TYPE" == "Release" ]]
then
mkdir -p $QTOX_PACKAGE_DIR
pushd $QTOX_PACKAGE_DIR
Expand Down

0 comments on commit 46ef312

Please sign in to comment.