Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache conan #575

Merged
merged 12 commits into from
May 14, 2024
14 changes: 7 additions & 7 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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: ${{ runner.os }}-conan-2
key: deps-ci-ubuntu-clang-Release

- name: run conan
run: |
Expand Down Expand Up @@ -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: ${{ runner.os }}-conan-2
key: deps-ci-ubuntu-clang-Release

- name: run conan
run: |
Expand Down Expand Up @@ -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 }}
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/cache_deps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Cache deps

on:
push:
branches:
- v2
pull_request:
branches:
- v2
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
cache_deps:
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 deps 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: Install Qt
uses: jurplel/install-qt-action@v3
with:
cache: true

- name: get conan
uses: turtlebrowser/get-conan@main

- name: cache deps
uses: actions/cache@v2
with:
path: |
~/.conan2
/Users/runner/.conan2/
key: deps-${{ 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 }}']"
67 changes: 37 additions & 30 deletions .github/workflows/ci v2.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
name: CI v2

on:
push:
branches:
- v2

pull_request:
branches:
- v2
workflow_run:
workflows: ["Cache deps"]
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
sanitize:
if: github.repository_owner == 'victimsnino' && github.event.workflow_run.conclusion == 'success'

strategy:
matrix:
sanitizer: ["tsan", "asan", "lsan", "ubsan"]
Expand All @@ -25,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
Expand All @@ -35,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: ${{ runner.os }}-conan-2
key: deps-ci-ubuntu-clang-Release

- name: run conan
run: |
Expand All @@ -67,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},
Expand All @@ -81,9 +86,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)"
Expand Down Expand Up @@ -115,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: ${{ runner.os }}-conan-2
key: deps-${{ matrix.config.name }}-${{ matrix.build_type.config }}

- name: run conan
run: |
Expand All @@ -145,11 +154,19 @@ 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

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" }
Expand All @@ -167,42 +184,32 @@ 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
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

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
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/comment_benchmarks_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand All @@ -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 }}
Expand Down
Loading