From b79e5359aef8dee9064cd6e2ef6e8a7549cf969c Mon Sep 17 00:00:00 2001 From: Daniel Nicoletti Date: Wed, 8 Nov 2023 20:11:55 -0300 Subject: [PATCH] Remove GitHub actions that do not work anymore and simplyfy our CMake one Windows was not removed to keep testing the qmake version --- .github/workflows/android.yml | 56 --------------- .github/workflows/cmake.yml | 125 ++++++++++++---------------------- .github/workflows/ios.yml | 52 -------------- .github/workflows/macos.yml | 53 -------------- .github/workflows/ubuntu.yml | 50 -------------- .github/workflows/windows.yml | 22 +++--- QXlsx/CMakeLists.txt | 12 ++-- 7 files changed, 65 insertions(+), 305 deletions(-) delete mode 100644 .github/workflows/android.yml delete mode 100644 .github/workflows/ios.yml delete mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/ubuntu.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml deleted file mode 100644 index edaa9a0f..00000000 --- a/.github/workflows/android.yml +++ /dev/null @@ -1,56 +0,0 @@ -# android.yml -# base code from https://github.com/jaredtao/HelloActions-Qt - -name: Android -on: - push: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' - pull_request: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' -jobs: - build: - name: Build - 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] - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ matrix.qt_ver }} - target: ${{ matrix.qt_target }} - arch: ${{ matrix.qt_arch }} - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - name: build android - run: | - export ANDROID_SDK_ROOT=$ANDROID_HOME - export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk-bundle - cd HelloAndroid - qmake - make diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6c565445..fc244e12 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -13,6 +13,9 @@ on: - 'ToUpgrade.md' - 'Vision.md' - 'LICENSE' + branches: + - master + pull_request: paths-ignore: - 'Example.md' @@ -25,95 +28,57 @@ on: - 'ToUpgrade.md' - 'Vision.md' - 'LICENSE' - -env: - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release + branches: + - master jobs: build: - runs-on: ubuntu-${{ matrix.ubuntu_version }} - name: Ubuntu-${{ matrix.ubuntu_version }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }} + runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: - ubuntu_version: [20.04, 22.04] - qt_version: [5.12.12, 5.15.2, 6.4.0] - shared: [ON, OFF] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ matrix.qt_version }} - cache: 'true' - cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} - dir: ${{ github.workspace }}/Qt + os: + - ubuntu-latest + - windows-latest + - macos-latest - - name: Install packages - run: sudo apt-get install -y libxkbcommon-dev libxcb-xkb-dev + build_type: + - Debug + - Release - - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build" -S "QXlsx" + link_type: + - static + - shared - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - MSVC: - name: windows-${{ matrix.win_version }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }} - runs-on: windows-${{ matrix.win_version }} - strategy: - fail-fast: false - matrix: - win_version: [2019, 2022] - qt_version: [5.12.12, 5.15.2, 6.4.0] - shared: [ON, OFF] + config: + - qt_version: "5.12" + - qt_version: "6.6.0" steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Qt + - name: Install Qt with options and default aqtversion uses: jurplel/install-qt-action@v3 with: - version: ${{ matrix.qt_version }} - cache: 'true' - cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} - dir: ${{ github.workspace }}/Qt - - - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build" -S "QXlsx" - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - macos: - runs-on: macos-${{ matrix.macos_version }} - name: macos-${{ matrix.macos_version }}-Qt-${{ matrix.qt_version }}-shared-${{ matrix.shared }} - strategy: - fail-fast: false - matrix: - macos_version: [11, 12] - qt_version: [5.15.2, 6.4.0] - shared: [ON, OFF] - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install Qt - uses: jurplel/install-qt-action@v3 - with: - version: ${{ matrix.qt_version }} - cache: 'true' - cache-key-prefix: ${{ runner.os }}-Qt-Cache-${{ matrix.qt_version }} - dir: ${{ github.workspace }}/Qt - - - name: Configure CMake - run: cmake -DCMAKE_BUILD_TYPE="${{env.BUILD_TYPE}}" -DBUILD_SHARED_LIBS=${{ matrix.shared }} -B "${{github.workspace}}/build" -S "QXlsx" - - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} \ No newline at end of file + aqtversion: null # use whatever the default is + modules: ${{ matrix.config.modules }} + version: ${{ matrix.config.qt_version }} + cache: true + + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Install ninja-build tool (must be after Qt due PATH changes) + uses: turtlesec-no/get-ninja@main + + - name: Make sure MSVC is found when Ninja generator is in use + uses: ilammy/msvc-dev-cmd@v1 + + - name: Configure project + run: > + cmake -S QXlsx -B ./build -G Ninja + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} + --warn-uninitialized + -Werror=dev + -DBUILD_SHARED_LIBS=${{ matrix.link_type == 'shared' }} + + - name: Build Project + run: cmake --build ./build diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml deleted file mode 100644 index 338da2e5..00000000 --- a/.github/workflows/ios.yml +++ /dev/null @@ -1,52 +0,0 @@ -# ios.yml -# base code from https://github.com/jaredtao/HelloActions-Qt - -name: IOS -on: - push: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' - pull_request: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-10.15] - qt_ver: [5.12.10,5.15.2] - qt_target: [ios] - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v2.10.0 - with: - version: ${{ matrix.qt_ver }} - target: ${{ matrix.qt_target }} - - uses: actions/checkout@v2 - with: - fetch-depth: 1 - - name: build ios - run: | - cd HelloAndroid - qmake -r -spec macx-ios-clang CONFIG+=release CONFIG+=iphoneos - make diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 8d694b3b..00000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,53 +0,0 @@ -# macos.yml -# base code from https://github.com/jaredtao/HelloActions-Qt - -name: MacOS -on: - push: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' - pull_request: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest] - qt_ver: [5.12.6] - qt_target: [desktop] - steps: - - name: Install Qt - uses: jurplel/install-qt-action@v2.13.2 - with: - version: ${{ matrix.qt_ver }} - target: ${{ matrix.qt_target }} - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: build - run: | - cd TestExcel - qmake - make - diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml deleted file mode 100644 index 82cde7a1..00000000 --- a/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,50 +0,0 @@ -# ubuntu.yml - -name: Ubuntu -on: - push: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' - pull_request: - paths-ignore: - - 'Example.md' - - 'HowToSetProject.ko.md' - - 'HowToSetProject.md' - - 'README.ko.md' - - 'README.md' - - 'TestEnv.md' - - 'ToTest.md' - - 'ToUpgrade.md' - - 'Vision.md' - - 'LICENSE' -jobs: - build: - name: Build - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-18.04] - qt_arch: [gcc_64] - steps: - - name: Install Qt - run : | - sudo apt-get update -y - sudo apt-get install build-essential libfontconfig1 mesa-common-dev libglu1-mesa-dev cmake qtdeclarative5-dev qml-module-qtquick-controls qtbase5-dev qtcreator qt5-default libqt5serialport5-dev qtbase5-private-dev qtdeclarative5-private-dev mesa-common-dev -y - - uses: actions/checkout@v1 - with: - fetch-depth: 1 - - name: Build Project - run: | - cd TestExcel - qmake - make - ./TestExcel diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index cb54222b..b0f6934a 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1,7 +1,6 @@ -# windows.yml - name: Windows -on: + +on: push: paths-ignore: - 'Example.md' @@ -13,7 +12,10 @@ on: - 'ToTest.md' - 'ToUpgrade.md' - 'Vision.md' - - 'LICENSE' + - 'LICENSE' + branches: + - master + pull_request: paths-ignore: - 'Example.md' @@ -25,15 +27,20 @@ on: - 'ToTest.md' - 'ToUpgrade.md' - 'Vision.md' - - 'LICENSE' + - 'LICENSE' + branches: + - master + jobs: build: runs-on: windows-2019 steps: - name: Install Qt - uses: jurplel/install-qt-action@v2.13.2 + uses: jurplel/install-qt-action@v3 + - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 + - name: Run Visual Studio shell: cmd run: | @@ -41,4 +48,3 @@ jobs: cd TestExcel qmake nmake - diff --git a/QXlsx/CMakeLists.txt b/QXlsx/CMakeLists.txt index 57327cf5..4c951143 100644 --- a/QXlsx/CMakeLists.txt +++ b/QXlsx/CMakeLists.txt @@ -28,17 +28,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) -if(NOT DEFINED ${QXLSX_PARENTPATH}) +if(NOT DEFINED QXLSX_PARENTPATH) set(QXLSX_PARENTPATH ${CMAKE_CURRENT_SOURCE_DIR}/../) -endif(NOT DEFINED ${QXLSX_PARENTPATH}) +endif() -if(NOT DEFINED ${QXLSX_HEADERPATH}) +if(NOT DEFINED QXLSX_HEADERPATH) set(QXLSX_HEADERPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/header/) -endif(NOT DEFINED ${QXLSX_HEADERPATH}) +endif() -if(NOT DEFINED ${QXLSX_SOURCEPATH}) +if(NOT DEFINED QXLSX_SOURCEPATH) set(QXLSX_SOURCEPATH ${CMAKE_CURRENT_SOURCE_DIR}/../QXlsx/source/) -endif(NOT DEFINED ${QXLSX_SOURCEPATH}) +endif() message("Current Path of QXlsx") message(${QXLSX_PARENTPATH})