Skip to content

Commit

Permalink
workflows used on: workflow_dispatch for Linux
Browse files Browse the repository at this point in the history
For Linux self-hosted runners.
  • Loading branch information
silverqx committed Apr 12, 2024
1 parent b97709c commit b01eeb1
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 20 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/analyzers.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
name: Clang-Tidy and Clazy Qt5.15/6.7

on:
push:
branches:
- main
- gh-actions
# Invoke manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
# The reason for this is that I have 2 self-hosted runners on one PC (one for Linux and other for
# Windows) and I'm not able to serialize all these workflows and because of that I would have to
# decrease parallel and it would take hours to finish, so all Linux workflows must be invoked
# manually.
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# - gh-actions

concurrency:
group: tinyorm-linux
Expand All @@ -24,9 +31,9 @@ jobs:
name: Qt5
version: 5.15.2

# - key: qt6
# name: Qt6
# version: 6.7.0
- key: qt6
name: Qt6
version: 6.7.0

env:
TINY_CLANG_TIDY_COMPLETED: false
Expand All @@ -45,6 +52,11 @@ jobs:
[[ "${{ runner.name }}" == 'merydeye-'* ]] && isSelfHostedRunner='true' || isSelfHostedRunner='false'
echo "TinyIsSelfHostedRunner=$isSelfHostedRunner" >> $GITHUB_ENV
# Parallel 4 ISN't maximum but because this workflow runs hours I will use parallel 4 to be
# able continue working on my PC, also, I decided to use the different strategy, I will use
# the on: workflow_dispatch for all Linux GitHub Actions and will invoke these workflows
# manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
[[ "$isSelfHostedRunner" == 'true' ]] && parallel=4 || parallel=2
echo "TinyParallel=$parallel" >> $GITHUB_ENV
Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/linux-qt6-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@

name: Linux GCC/Clang Qt6.7 TinyDrivers

on:
push:
branches:
- main
- gh-actions
- silverqx-develop
# Invoke manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
# The reason for this is that I have 2 self-hosted runners on one PC (one for Linux and other for
# Windows) and I'm not able to serialize all these workflows and because of that I would have to
# decrease parallel and it would take hours to finish, so all Linux workflows must be invoked
# manually.
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# - gh-actions

concurrency:
group: tinyorm-linux
Expand All @@ -31,6 +37,7 @@ jobs:
strategy:
matrix:
drivers-type: [Shared, Loadable]

build-type:
- key: debug
name: Debug
Expand All @@ -55,13 +62,19 @@ jobs:
runnerWorkPath=$(realpath '${{ runner.workspace }}/..')
echo "TinyRunnerWorkPath=$runnerWorkPath" >> $GITHUB_ENV
# Parallel gcc to 3 and clang to 8 is maximum what my computer allows but I decided to use
# the different strategy, I will use the on: workflow_dispatch for all Linux GitHub Actions
# and will invoke these workflows manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
# --
# The description below is Outdated but I leave the comment.
# For gcc13 with the parallel 4 I saw 15.1GB maximum memory usage from 15.6GB and that is
# very close to the edge, so I have to decrease it to 3.
# For clang18 it was ~11.6 from 15.6GB so parallel 8 is ok.
# I must divide all parallel by 2 because I have 2 self-hosted runners on the same computer
# and also -1 for reserve to avoid swapping, so for clang: 8 / 2 - 1 = 3 and for gcc:
# 3 / 2 - 1 = 1.
parallel=${{ matrix.compiler.key == 'gcc13' && '1' || '3' }}
parallel=${{ matrix.compiler.key == 'gcc13' && '3' || '8' }}
echo "TinyParallel=$parallel" >> $GITHUB_ENV
tinyormPath=$(realpath ./main)
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/vcpkg-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@

name: Vcpkg Linux

on:
push:
branches:
- main
- gh-actions
# Invoke manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
# The reason for this is that I have 2 self-hosted runners on one PC (one for Linux and other for
# Windows) and I'm not able to serialize all these workflows and because of that I would have to
# decrease parallel and it would take hours to finish, so all Linux workflows must be invoked
# manually.
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# - gh-actions

concurrency:
group: tinyorm-linux
Expand Down Expand Up @@ -70,6 +77,12 @@ jobs:
[[ "${{ runner.name }}" == 'merydeye-'* ]] && isSelfHostedRunner='true' || isSelfHostedRunner='false'
echo "TinyIsSelfHostedRunner=$isSelfHostedRunner" >> $GITHUB_ENV
# Parallel gcc to 3 and clang to 8 is maximum what my computer allows but I decided to use
# the different strategy, I will use the on: workflow_dispatch for all Linux GitHub Actions
# and will invoke these workflows manually from the command-line using the gh command, eg.:
# gh workflow run --ref silverqx-develop
# --
# The description below is Outdated but I leave the comment.
# I must divide all parallel by 2 because I have 2 self-hosted runners on the same computer
# and also -1 for reserve to avoid swapping, so 10 / 2 - 1 = 4
[[ "$isSelfHostedRunner" == 'true' ]] && parallel=4 || parallel=2
Expand Down

0 comments on commit b01eeb1

Please sign in to comment.