From eba263a8c6650969000b988be9a687e84204f77c Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:11:36 +0300 Subject: [PATCH 01/10] Ignore changes in markdown --- .github/workflows/build-cmake.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 6344b50..cbc0996 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -1,6 +1,12 @@ name: "CI: Build Test" -on: [push, pull_request] +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" jobs: build: From 0c1d21a49054dab43e2ad5dc04614358448f0c4c Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:11:55 +0300 Subject: [PATCH 02/10] Format with prettier --- .github/workflows/build-cmake.yml | 49 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index cbc0996..1ded607 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -10,7 +10,6 @@ on: jobs: build: - strategy: matrix: qt_version: [5.12.6, 5.13.2, 5.14.0, 5.15.0, 6.0.0] @@ -30,33 +29,33 @@ jobs: CXXFLAGS: ${{ matrix.CXXFLAGS }} steps: - - uses: actions/checkout@v2.3.4 + - uses: actions/checkout@v2.3.4 - - name: Install Qt - uses: jurplel/install-qt-action@v2.11.1 - with: - version: ${{ matrix.qt_version }} + - name: Install Qt + uses: jurplel/install-qt-action@v2.11.1 + with: + version: ${{ matrix.qt_version }} - - name: cmake - run: cmake . ${{ matrix.additional_arguments }} + - name: cmake + run: cmake . ${{ matrix.additional_arguments }} - - name: cmake build - run: cmake --build . + - name: cmake build + run: cmake --build . - - name: Build example - basic (cmake) - working-directory: examples/basic/ - run: | - cmake . ${{ matrix.additional_arguments }} - cmake --build . + - name: Build example - basic (cmake) + working-directory: examples/basic/ + run: | + cmake . ${{ matrix.additional_arguments }} + cmake --build . - - name: Build example - calculator (cmake) - working-directory: examples/calculator/ - run: | - cmake . ${{ matrix.additional_arguments }} - cmake --build . + - name: Build example - calculator (cmake) + working-directory: examples/calculator/ + run: | + cmake . ${{ matrix.additional_arguments }} + cmake --build . - - name: Build example - sending_arguments (cmake) - working-directory: examples/sending_arguments/ - run: | - cmake . ${{ matrix.additional_arguments }} - cmake --build . + - name: Build example - sending_arguments (cmake) + working-directory: examples/sending_arguments/ + run: | + cmake . ${{ matrix.additional_arguments }} + cmake --build . From 7c6e91f3bc7ed9a920625fdc9acd7ae9a179fe4f Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:18:23 +0300 Subject: [PATCH 03/10] Make CI labels more consistent --- .github/workflows/build-cmake.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 1ded607..16bdb25 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -29,18 +29,18 @@ jobs: CXXFLAGS: ${{ matrix.CXXFLAGS }} steps: - - uses: actions/checkout@v2.3.4 + - name: Clone repo + uses: actions/checkout@v2.3.4 - name: Install Qt uses: jurplel/install-qt-action@v2.11.1 with: version: ${{ matrix.qt_version }} - - name: cmake - run: cmake . ${{ matrix.additional_arguments }} - - - name: cmake build - run: cmake --build . + - name: Build library + run: | + cmake . ${{ matrix.additional_arguments }} + cmake --build . - name: Build example - basic (cmake) working-directory: examples/basic/ From 6cc4f481dbf0664884a8c931308898519da9de89 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:26:46 +0300 Subject: [PATCH 04/10] Ignore release drafts --- .github/workflows/build-cmake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 16bdb25..6053315 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -2,6 +2,8 @@ name: "CI: Build Test" on: push: + branches-ignore: + - "releases/**" paths-ignore: - "**.md" pull_request: From 00a571c21c0383ee6bb11a39ac980f558af5c41f Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:27:51 +0300 Subject: [PATCH 05/10] Remove pull_request Triggers CI twice. --- .github/workflows/build-cmake.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 6053315..8b32e8d 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -6,9 +6,6 @@ on: - "releases/**" paths-ignore: - "**.md" - pull_request: - paths-ignore: - - "**.md" jobs: build: From e1457378019a26fd05650efeb8fb85950b8749a0 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:36:47 +0300 Subject: [PATCH 06/10] Add QMake to CI --- .github/workflows/build-cmake.yml | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build-cmake.yml index 8b32e8d..e97e4ac 100644 --- a/.github/workflows/build-cmake.yml +++ b/.github/workflows/build-cmake.yml @@ -36,25 +36,46 @@ jobs: with: version: ${{ matrix.qt_version }} - - name: Build library + - name: Build library with CMake run: | cmake . ${{ matrix.additional_arguments }} cmake --build . - - name: Build example - basic (cmake) + - name: Build basic example with CMake working-directory: examples/basic/ run: | cmake . ${{ matrix.additional_arguments }} cmake --build . - - name: Build example - calculator (cmake) + - name: Build calculator example CMake working-directory: examples/calculator/ run: | cmake . ${{ matrix.additional_arguments }} cmake --build . - - name: Build example - sending_arguments (cmake) + - name: Build sending_arguments example with CMake working-directory: examples/sending_arguments/ run: | cmake . ${{ matrix.additional_arguments }} cmake --build . + + - name: Setup MSVC environment for QMake + uses: ilammy/msvc-dev-cmd@v1 + + - name: Build basic example with QMake + working-directory: examples/basic/ + run: | + qmake + make + + - name: Build calculator example QMake + working-directory: examples/calculator/ + run: | + qmake + make + + - name: Build sending_arguments example with QMake + working-directory: examples/sending_arguments/ + run: | + qmake + make From 66e87472bea7943d37143c824ec71eefa974f361 Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:54:30 +0300 Subject: [PATCH 07/10] Rename build-cmake.yml to build.yml --- .github/workflows/{build-cmake.yml => build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build-cmake.yml => build.yml} (100%) diff --git a/.github/workflows/build-cmake.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/build-cmake.yml rename to .github/workflows/build.yml From 307ffb2811f43a17b22fb02d0153a4e6b5dbc0cd Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 11:58:31 +0300 Subject: [PATCH 08/10] Use multiply cores https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e97e4ac..fac7c6e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,14 +18,18 @@ jobs: additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6 - platform: ubuntu-20.04 CXXFLAGS: -Wall -Wextra -pedantic -Werror + MAKEFLAGS: -j2 - platform: macos-latest CXXFLAGS: -Wall -Wextra -pedantic -Werror + MAKEFLAGS: -j3 - platform: windows-latest CXXFLAGS: /W4 /WX + MAKEFLAGS: /m runs-on: ${{ matrix.platform }} env: CXXFLAGS: ${{ matrix.CXXFLAGS }} + MAKEFLAGS: ${{ matrix.MAKEFLAGS }} steps: - name: Clone repo From e17a3c2db8df312039ba05ff5111add84da98bca Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 12:18:52 +0300 Subject: [PATCH 09/10] Specify platform-dependend make --- .github/workflows/build.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fac7c6e..6eed4f0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,14 +17,16 @@ jobs: - qt_version: 6.0.0 additional_arguments: -D QT_DEFAULT_MAJOR_VERSION=6 - platform: ubuntu-20.04 + make: make CXXFLAGS: -Wall -Wextra -pedantic -Werror MAKEFLAGS: -j2 - platform: macos-latest + make: make CXXFLAGS: -Wall -Wextra -pedantic -Werror MAKEFLAGS: -j3 - platform: windows-latest - CXXFLAGS: /W4 /WX - MAKEFLAGS: /m + make: nmake + CXXFLAGS: /W4 /WX /MP runs-on: ${{ matrix.platform }} env: @@ -70,16 +72,16 @@ jobs: working-directory: examples/basic/ run: | qmake - make + ${{ matrix.make }} - name: Build calculator example QMake working-directory: examples/calculator/ run: | qmake - make + ${{ matrix.make }} - name: Build sending_arguments example with QMake working-directory: examples/sending_arguments/ run: | qmake - make + ${{ matrix.make }} From abfff350867ad7d5415eff64b13335308da954af Mon Sep 17 00:00:00 2001 From: Hennadii Chernyshchyk Date: Sun, 3 Oct 2021 12:50:50 +0300 Subject: [PATCH 10/10] Update install-qt action --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6eed4f0..ffc37f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v2.3.4 - name: Install Qt - uses: jurplel/install-qt-action@v2.11.1 + uses: jurplel/install-qt-action@v2.14.0 with: version: ${{ matrix.qt_version }}