From 68f4e5c0fa642acbdf9665c2c552b0b781992334 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 19 Feb 2022 00:41:35 +0000 Subject: [PATCH] chore: Simplify and speed up windows builds using docker image. --- .github/scripts/cmake-windows.sh | 59 +++++++++++--------------------- .github/workflows/ci.yml | 4 --- 2 files changed, 20 insertions(+), 43 deletions(-) diff --git a/.github/scripts/cmake-windows.sh b/.github/scripts/cmake-windows.sh index dac5e396..ed2f6773 100644 --- a/.github/scripts/cmake-windows.sh +++ b/.github/scripts/cmake-windows.sh @@ -1,48 +1,29 @@ #!/bin/bash -ACTION="$1" - set -eu NPROC=$(nproc) -ci_install() { - docker build \ - --build-arg SUPPORT_ARCH_i686="$i686" \ - --build-arg SUPPORT_ARCH_x86_64="$x86_64" \ - --build-arg SUPPORT_TEST=true \ - -t toxcore-"$WINDOWS_ARCH" \ - other/docker/windows -} +. ".github/scripts/flags-gcc.sh" -ci_script() { - . ".github/scripts/flags-gcc.sh" +# Allows wine to display source code file names and line numbers on crash in +# its backtrace. +add_flag -gdwarf-2 - # Allows wine to display source code file names and line numbers on crash in - # its backtrace. - add_flag -gdwarf-2 +# Fix invalid register for .seh_savexmm error +add_flag -fno-asynchronous-unwind-tables - # Fix invalid register for .seh_savexmm error - add_flag -fno-asynchronous-unwind-tables - - docker run \ - -e ALLOW_TEST_FAILURE=true \ - -e ENABLE_ARCH_i686="$i686" \ - -e ENABLE_ARCH_x86_64="$x86_64" \ - -e ENABLE_TEST=true \ - -e EXTRA_CMAKE_FLAGS="-DBOOTSTRAP_DAEMON=OFF -DMIN_LOGGER_LEVEL=DEBUG -DTEST_TIMEOUT_SECONDS=90 -DAUTOTEST=ON" \ - -e CMAKE_C_FLAGS="$C_FLAGS" \ - -e CMAKE_CXX_FLAGS="$CXX_FLAGS" \ - -e CMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \ - -e CMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \ - -v "$PWD:/toxcore" \ - -v "$PWD/result:/prefix" \ - --rm \ - toxcore-"$WINDOWS_ARCH" -} - -if [ "-z" "$ACTION" ]; then - "ci_script" -else - "ci_$ACTION" -fi +docker run \ + -e ALLOW_TEST_FAILURE=true \ + -e ENABLE_ARCH_i686="$i686" \ + -e ENABLE_ARCH_x86_64="$x86_64" \ + -e ENABLE_TEST=true \ + -e EXTRA_CMAKE_FLAGS="-DBOOTSTRAP_DAEMON=OFF -DMIN_LOGGER_LEVEL=DEBUG -DTEST_TIMEOUT_SECONDS=90 -DAUTOTEST=ON" \ + -e CMAKE_C_FLAGS="$C_FLAGS" \ + -e CMAKE_CXX_FLAGS="$CXX_FLAGS" \ + -e CMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \ + -e CMAKE_SHARED_LINKER_FLAGS="$LD_FLAGS" \ + -v "$PWD:/toxcore" \ + -v "$PWD/result:/prefix" \ + --rm \ + "toxchat/windows:$WINDOWS_ARCH" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b107d706..f73e053c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,8 +47,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Docker Build - run: .github/scripts/cmake-win32 install - name: Cross compilation run: .github/scripts/cmake-win32 script @@ -56,8 +54,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Docker Build - run: .github/scripts/cmake-win64 install - name: Cross compilation run: .github/scripts/cmake-win64 script