From 246966f3942b5933a1d8c18abef2219118b604b6 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:11:53 +0300 Subject: [PATCH 01/12] Create cache_conan --- .github/workflows/cache_conan | 63 +++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/cache_conan diff --git a/.github/workflows/cache_conan b/.github/workflows/cache_conan new file mode 100644 index 000000000..7f11d396a --- /dev/null +++ b/.github/workflows/cache_conan @@ -0,0 +1,63 @@ +name: Cache conan deps + +on: + push: + branches: + - v2 + + pull_request: + branches: + - v2 + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + + +jobs: + cache_conan: + strategy: + matrix: + config: [{name: ci-ubuntu-gcc, os: ubuntu-latest}, + {name: ci-ubuntu-clang, os: ubuntu-latest}, + {name: ci-windows, os: windows-latest}, + {name: ci-macos, os: macos-12}] + build_type: [{config: Release}, {config: Debug}] + + timeout-minutes: 120 + runs-on: ${{ matrix.config.os }} + name: Cache conan on ${{ matrix.config.name }} for ${{ matrix.build_type.config }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Work around https://github.com/actions/runner-images/issues/8659 + - name: "Remove GCC 13 from runner image (workaround)" + if: matrix.config.os == 'ubuntu-latest' + shell: bash + run: | + sudo apt-get purge -y g++-13 gcc-13 libstdc++-13-dev + sudo apt-get install -y --allow-downgrades libstdc++-12-dev libstdc++6=12.* libgcc-s1=12.* + + - name: get conan + uses: turtlebrowser/get-conan@main + + - name: cache conan + uses: actions/cache@v2 + with: + path: | + ~/.conan2 + /Users/runner/.conan2/ + key: conan-2-${{ matrix.config.name }}-${{ matrix.build_type.config }} + + - name: conan detect profile + run: | + conan profile detect --force + + - name: Run CMake + uses: lukka/run-cmake@v10 + with: + configurePreset: ${{ matrix.config.name }}-tests + configurePresetAdditionalArgs: "['-DCMAKE_BUILD_TYPE=${{ matrix.build_type.config }}']" From 90b1351767ad04385b23638dfb08d48316488e1f Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:13:16 +0300 Subject: [PATCH 02/12] Update ci v2.yml --- .github/workflows/ci v2.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 26aaa1afc..1ddd2c596 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -1,19 +1,15 @@ name: CI v2 on: - push: - branches: - - v2 - - pull_request: - branches: - - v2 + workflow_run: + workflows: ["Cache conan deps"] + types: + - completed concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true - jobs: sanitize: strategy: From ff3631204fb58f02a105a02fd5b02f21c768e9ba Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:17:45 +0300 Subject: [PATCH 03/12] Update ci v2.yml --- .github/workflows/ci v2.yml | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 1ddd2c596..4324e5035 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -10,6 +10,8 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true +if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' + jobs: sanitize: strategy: @@ -21,7 +23,13 @@ jobs: timeout-minutes: 15 steps: + - uses: haya14busa/action-workflow_run-status@v1 - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + repository: ${{ github.event.workflow_run.head_repository.full_name }} + ref: ${{ github.event.workflow_run.head_branch }} - name: Install Qt uses: jurplel/install-qt-action@v3 @@ -77,9 +85,13 @@ jobs: name: ${{ matrix.type }} ${{ matrix.config.name }} ${{ matrix.build_type.config }} steps: + - uses: haya14busa/action-workflow_run-status@v1 - uses: actions/checkout@v4 with: - fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + repository: ${{ github.event.workflow_run.head_repository.full_name }} + ref: ${{ github.event.workflow_run.head_branch }} # Work around https://github.com/actions/runner-images/issues/8659 - name: "Remove GCC 13 from runner image (workaround)" @@ -145,7 +157,13 @@ jobs: runs-on: ubuntu-latest steps: + - uses: haya14busa/action-workflow_run-status@v1 - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + repository: ${{ github.event.workflow_run.head_repository.full_name }} + ref: ${{ github.event.workflow_run.head_branch }} - uses: actions/setup-python@v5 with: { python-version: "3.8" } @@ -163,7 +181,7 @@ jobs: - name: Deploy uses: peaceiris/actions-gh-pages@v4 - if: github.event_name == 'push' && github.repository_owner == 'victimsnino' + if: github.event.workflow_run.event == 'push' && github.repository_owner == 'victimsnino' with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./gen_docs @@ -175,9 +193,13 @@ jobs: name: Test RPP as package - ubuntu-latest steps: + - uses: haya14busa/action-workflow_run-status@v1 - uses: actions/checkout@v4 with: - fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + repository: ${{ github.event.workflow_run.head_repository.full_name }} + ref: ${{ github.event.workflow_run.head_branch }} - name: Install Qt uses: jurplel/install-qt-action@v3 From 1fe6ec7af433ea53e20923ec5e24dd739a70b3e1 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:18:52 +0300 Subject: [PATCH 04/12] Update comment_benchmarks_v2.yml --- .github/workflows/comment_benchmarks_v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/comment_benchmarks_v2.yml b/.github/workflows/comment_benchmarks_v2.yml index 91474f530..be012bc4a 100644 --- a/.github/workflows/comment_benchmarks_v2.yml +++ b/.github/workflows/comment_benchmarks_v2.yml @@ -54,7 +54,7 @@ jobs: - name: Find Comment uses: peter-evans/find-comment@v3 id: fc - if: github.event.workflow_run.event != 'push' + if: github.event.workflow_run.event == 'pull_request' with: issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }} comment-author: 'github-actions[bot]' @@ -69,7 +69,7 @@ jobs: - name: Update comment uses: peter-evans/create-or-update-comment@v4 - if: github.event.workflow_run.event != 'push' + if: github.event.workflow_run.event == 'pull_request' with: comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ steps.source-run-info.outputs.pullRequestNumber }} From 6fe27d6cacd5a76b46fc87e14192fc1d96e7b36d Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:19:53 +0300 Subject: [PATCH 05/12] Update analyzers.yml --- .github/workflows/analyzers.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index a9e400117..e208004b0 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -7,14 +7,14 @@ on: types: - completed + jobs: pvs: + if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' runs-on: ubuntu-latest timeout-minutes: 10 - if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' - steps: - uses: haya14busa/action-workflow_run-status@v1 @@ -172,7 +172,7 @@ jobs: - name: Run sonar-scanner on PullRequest - if: github.event.workflow_run.event != 'push' + if: github.event.workflow_run.event == 'pull_request' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From e487ad2f2781a7489f2fda46672ae23f0c82539c Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:20:54 +0300 Subject: [PATCH 06/12] Update ci v2.yml --- .github/workflows/ci v2.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 4324e5035..631d432a9 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -10,10 +10,10 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' - jobs: sanitize: + if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' + strategy: matrix: sanitizer: ["tsan", "asan", "lsan", "ubsan"] @@ -71,6 +71,7 @@ jobs: testPreset: ci-sanitize tests: + if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' strategy: matrix: config: [{name: ci-ubuntu-gcc, os: ubuntu-latest}, @@ -153,6 +154,8 @@ jobs: path: ${{github.workspace}}/build/test_results/benchmarks_results.json docs: + if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' + name: Build Doxygen Docs runs-on: ubuntu-latest @@ -188,6 +191,7 @@ jobs: destination_dir: v2/docs use_rpp_as_package: + if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' timeout-minutes: 20 runs-on: ubuntu-latest name: Test RPP as package - ubuntu-latest From c462cf2fe8e6c94e8db1de58276d77b52e6bbc03 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:24:55 +0300 Subject: [PATCH 07/12] use same cache name --- .github/workflows/analyzers.yml | 4 ++-- .../{cache_conan => cache_conan.yml} | 0 .github/workflows/ci v2.yml | 19 ++----------------- 3 files changed, 4 insertions(+), 19 deletions(-) rename .github/workflows/{cache_conan => cache_conan.yml} (100%) diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index e208004b0..fc70e4793 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -46,7 +46,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: ${{ runner.os }}-conan-2 + key: conan-2-ci-ubuntu-clang-Release - name: run conan run: | @@ -128,7 +128,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: ${{ runner.os }}-conan-2 + key: conan-2-ci-ubuntu-clang-Release - name: run conan run: | diff --git a/.github/workflows/cache_conan b/.github/workflows/cache_conan.yml similarity index 100% rename from .github/workflows/cache_conan rename to .github/workflows/cache_conan.yml diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 631d432a9..a65032eb2 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -45,7 +45,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: ${{ runner.os }}-conan-2 + key: conan-2-ci-ubuntu-clang-Release - name: run conan run: | @@ -130,7 +130,7 @@ jobs: path: | ~/.conan2 /Users/runner/.conan2/ - key: ${{ runner.os }}-conan-2 + key: conan-2-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: run conan run: | @@ -210,21 +210,6 @@ jobs: with: cache: true - - name: get conan - uses: turtlebrowser/get-conan@main - - - name: cache conan - uses: actions/cache@v2 - with: - path: | - ~/.conan2 - /Users/runner/.conan2/ - key: ${{ runner.os }}-conan-2 - - - name: run conan - run: | - conan profile detect --force - - name: Install project and build env: CC: gcc-10 From 672e2c83516effe9f32b290aa00f3bee1a420414 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 13:25:15 +0000 Subject: [PATCH 08/12] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/ci v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index a65032eb2..096c20f44 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -13,7 +13,7 @@ concurrency: jobs: sanitize: if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' - + strategy: matrix: sanitizer: ["tsan", "asan", "lsan", "ubsan"] @@ -155,7 +155,7 @@ jobs: docs: if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success' - + name: Build Doxygen Docs runs-on: ubuntu-latest From 7105469f3a3d1c4840adbec186bb954702c9d37f Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:30:37 +0300 Subject: [PATCH 09/12] Update cache_conan.yml --- .github/workflows/cache_conan.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/cache_conan.yml b/.github/workflows/cache_conan.yml index 7f11d396a..45990de47 100644 --- a/.github/workflows/cache_conan.yml +++ b/.github/workflows/cache_conan.yml @@ -41,6 +41,11 @@ jobs: sudo apt-get purge -y g++-13 gcc-13 libstdc++-13-dev sudo apt-get install -y --allow-downgrades libstdc++-12-dev libstdc++6=12.* libgcc-s1=12.* + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + cache: true + - name: get conan uses: turtlebrowser/get-conan@main From 3da1c51c20dc5a5507e0c1293fb0d47e6807e36f Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:49:28 +0300 Subject: [PATCH 10/12] rename --- .github/workflows/{cache_conan.yml => cache_deps.yml} | 6 +++--- .github/workflows/ci v2.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename .github/workflows/{cache_conan.yml => cache_deps.yml} (93%) diff --git a/.github/workflows/cache_conan.yml b/.github/workflows/cache_deps.yml similarity index 93% rename from .github/workflows/cache_conan.yml rename to .github/workflows/cache_deps.yml index 45990de47..f47f316dd 100644 --- a/.github/workflows/cache_conan.yml +++ b/.github/workflows/cache_deps.yml @@ -1,4 +1,4 @@ -name: Cache conan deps +name: Cache deps on: push: @@ -15,7 +15,7 @@ concurrency: jobs: - cache_conan: + cache_deps: strategy: matrix: config: [{name: ci-ubuntu-gcc, os: ubuntu-latest}, @@ -26,7 +26,7 @@ jobs: timeout-minutes: 120 runs-on: ${{ matrix.config.os }} - name: Cache conan on ${{ matrix.config.name }} for ${{ matrix.build_type.config }} + name: Cache deps on ${{ matrix.config.name }} for ${{ matrix.build_type.config }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 096c20f44..09dd89f58 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -2,7 +2,7 @@ name: CI v2 on: workflow_run: - workflows: ["Cache conan deps"] + workflows: ["Cache deps"] types: - completed From 41103ad7a029d2891d047ebfcd85a59e1e32ca66 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:50:24 +0300 Subject: [PATCH 11/12] renamings --- .github/workflows/analyzers.yml | 8 ++++---- .github/workflows/cache_deps.yml | 4 ++-- .github/workflows/ci v2.yml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/analyzers.yml b/.github/workflows/analyzers.yml index fc70e4793..a57ad17e6 100644 --- a/.github/workflows/analyzers.yml +++ b/.github/workflows/analyzers.yml @@ -40,13 +40,13 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache conan + - name: cache deps uses: actions/cache@v2 with: path: | ~/.conan2 /Users/runner/.conan2/ - key: conan-2-ci-ubuntu-clang-Release + key: deps-ci-ubuntu-clang-Release - name: run conan run: | @@ -122,13 +122,13 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache conan + - name: cache deps uses: actions/cache@v2 with: path: | ~/.conan2 /Users/runner/.conan2/ - key: conan-2-ci-ubuntu-clang-Release + key: deps-ci-ubuntu-clang-Release - name: run conan run: | diff --git a/.github/workflows/cache_deps.yml b/.github/workflows/cache_deps.yml index f47f316dd..111e11472 100644 --- a/.github/workflows/cache_deps.yml +++ b/.github/workflows/cache_deps.yml @@ -49,13 +49,13 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache conan + - name: cache deps uses: actions/cache@v2 with: path: | ~/.conan2 /Users/runner/.conan2/ - key: conan-2-${{ matrix.config.name }}-${{ matrix.build_type.config }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: conan detect profile run: | diff --git a/.github/workflows/ci v2.yml b/.github/workflows/ci v2.yml index 09dd89f58..ced4bd3dd 100644 --- a/.github/workflows/ci v2.yml +++ b/.github/workflows/ci v2.yml @@ -39,13 +39,13 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache conan + - name: cache deps uses: actions/cache@v2 with: path: | ~/.conan2 /Users/runner/.conan2/ - key: conan-2-ci-ubuntu-clang-Release + key: deps-ci-ubuntu-clang-Release - name: run conan run: | @@ -124,13 +124,13 @@ jobs: - name: get conan uses: turtlebrowser/get-conan@main - - name: cache conan + - name: cache deps uses: actions/cache@v2 with: path: | ~/.conan2 /Users/runner/.conan2/ - key: conan-2-${{ matrix.config.name }}-${{ matrix.build_type.config }} + key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }} - name: run conan run: | From d395bfff070dedb7c802185fc3594cffa765b4b3 Mon Sep 17 00:00:00 2001 From: Aleksey Loginov Date: Tue, 14 May 2024 16:53:22 +0300 Subject: [PATCH 12/12] Update cache_deps.yml --- .github/workflows/cache_deps.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cache_deps.yml b/.github/workflows/cache_deps.yml index 111e11472..a8d487788 100644 --- a/.github/workflows/cache_deps.yml +++ b/.github/workflows/cache_deps.yml @@ -4,10 +4,11 @@ on: push: branches: - v2 - pull_request: branches: - v2 + schedule: + - cron: '0 0 * * *' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}