From 4ca856c365122d9d0c40c7f6fa863447e7ed635f Mon Sep 17 00:00:00 2001 From: jared Date: Tue, 18 Jan 2022 11:08:49 +0800 Subject: [PATCH] update ci --- .github/workflows/android-qt5_15_2.yml | 52 -------------------------- .github/workflows/android.yml | 35 +++++++++++++---- CMakeLists.txt | 2 +- 3 files changed, 28 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/android-qt5_15_2.yml diff --git a/.github/workflows/android-qt5_15_2.yml b/.github/workflows/android-qt5_15_2.yml deleted file mode 100644 index 14560b4..0000000 --- a/.github/workflows/android-qt5_15_2.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: android-qt5_15_2 -on: - # push代码时触发workflow - push: - paths: - - '3rdparty/**' - - 'examples/**' - - 'mkspecs/**' - - 'src/**' - - '.qmake.conf' - - 'TaoQuick.pro' - - '.github/workflows/android-qt5_15_2.yml' - # pull_request时触发workflow - pull_request: - paths: - - '3rdparty/**' - - 'examples/**' - - 'mkspecs/**' - - 'src/**' - - '.qmake.conf' - - 'TaoQuick.pro' - - '.github/workflows/android-qt5_15_2.yml' -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04] - qt_ver: [5.15.2] - qt_target: [android] - - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v2.13.0 - with: - # Version of Qt to install - version: ${{ matrix.qt_ver }} - # Target platform for build - target: android - # Architecture for Windows/Android - # arch: ${{ matrix.qt_arch }} - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - submodules: 'true' - - name: build android - run: | - export ANDROID_SDK_ROOT=$ANDROID_HOME - export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle - qmake - make \ No newline at end of file diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3b26ba9..9fd1293 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -26,20 +26,39 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - qt_ver: [5.12.10] - qt_target: [android] - qt_arch: [android_x86,android_armv7,android_arm64_v8a] + include: + - qt_ver: 5.12.10 + qt_arch: android_x86 + os: ubuntu-20.04 + qt_target: android + - qt_ver: 5.12.10 + qt_arch: android_armv7 + os: ubuntu-20.04 + qt_target: android + - qt_ver: 5.12.10 + qt_arch: android_arm64_v8a + os: ubuntu-20.04 + qt_target: android + - qt_ver: 5.15.2 + # here no qt_arch, use default + os: ubuntu-20.04 + qt_target: android steps: - name: Install Qt uses: jurplel/install-qt-action@v2 + if: ${{ matrix.qt_ver == '5.12.10' }} with: - # Version of Qt to install version: ${{ matrix.qt_ver }} - # Target platform for build target: ${{ matrix.qt_target }} - # Architecture for Windows/Android - arch: ${{ matrix.qt_arch }} + arch: ${{ matrix.qt_arch }} + - name: Install Qt + uses: jurplel/install-qt-action@v2 + if: ${{ matrix.qt_ver == '5.15.2' }} + with: + version: ${{ matrix.qt_ver }} + target: ${{ matrix.qt_target }} + # here need not arch + # arch: ${{ matrix.qt_arch }} - uses: actions/checkout@v2 with: fetch-depth: 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 6af7fe0..6b9bc75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON) if(MSVC) add_compile_options("$<$:/utf-8>") add_compile_options("$<$:/utf-8>") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /UMBCS /D_UNICODE /DUNICODE") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_UNICODE /DUNICODE") endif() add_subdirectory(examples)