Skip to content

Commit

Permalink
DEBUGGIN ACTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-krechetov committed Jan 30, 2023
1 parent 9c5c126 commit 031796b
Show file tree
Hide file tree
Showing 32 changed files with 2,298 additions and 186 deletions.
98 changes: 40 additions & 58 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,67 +41,49 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: awalsh128/cache-apt-pkgs-action@v1.2.2
with:
packages: libglibmm-2.4-dev
version: 1.0

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.4.*'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: ''
cache: 'true'
cache-key-prefix: 'install-qt-action-linux'
set-env: 'true'

- name: Configure CMake
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DHSMBUILD_VERBOSE=OFF \
-DHSMBUILD_DISPATCHER_GLIB=ON \
-DHSMBUILD_DISPATCHER_GLIBMM=ON \
-DHSMBUILD_DISPATCHER_STD=ON \
-DHSMBUILD_DISPATCHER_QT=ON \
-DHSMBUILD_TESTS=ON \
-DHSMBUILD_EXAMPLES=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --parallel 2 --config ${{env.BUILD_TYPE}}
- uses: actions/checkout@v3
- uses: ./.github/workflows/build_helper
with:
src_dir: ${{github.workspace}}
build_dir: ${{github.workspace}}/build
platform: 'ubuntu'

build-windows:
needs: validate-metadata
runs-on: windows-latest

steps:
- uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.4.*'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: ''
cache: 'true'
cache-key-prefix: 'install-qt-action-win32'
set-env: 'true'

- name: Configure CMake
run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^
-DHSMBUILD_VERBOSE=OFF ^
-DHSMBUILD_DISPATCHER_GLIB=OFF ^
-DHSMBUILD_DISPATCHER_GLIBMM=OFF ^
-DHSMBUILD_DISPATCHER_STD=ON ^
-DHSMBUILD_DISPATCHER_QT=ON ^
-DHSMBUILD_TESTS=ON ^
-DHSMBUILD_EXAMPLES=ON

- name: Build
run: cmake --build ${{github.workspace}}\build --parallel 2 --config ${{env.BUILD_TYPE}}
- uses: actions/checkout@v3
- uses: ./.github/workflows/build_helper
with:
src_dir: ${{github.workspace}}
build_dir: ${{github.workspace}}/build
platform: 'windows'

# steps:
# - uses: actions/checkout@v3

# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
# version: '6.4.*'
# host: 'windows'
# target: 'desktop'
# arch: 'win64_msvc2019_64'
# modules: ''
# cache: 'true'
# cache-key-prefix: 'install-qt-action-win32'
# set-env: 'true'

# - name: Configure CMake
# run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^
# -DHSMBUILD_VERBOSE=OFF ^
# -DHSMBUILD_DISPATCHER_GLIB=OFF ^
# -DHSMBUILD_DISPATCHER_GLIBMM=OFF ^
# -DHSMBUILD_DISPATCHER_STD=ON ^
# -DHSMBUILD_DISPATCHER_QT=ON ^
# -DHSMBUILD_TESTS=ON ^
# -DHSMBUILD_EXAMPLES=ON

# - name: Build
# run: cmake --build ${{github.workspace}}\build --parallel 2 --config ${{env.BUILD_TYPE}}
122 changes: 122 additions & 0 deletions .github/workflows/build_helper/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: "Build Helper"

inputs:
# values: ubuntu, windows
platform:
required: true
type: string
default: 'ubuntu'
src_dir:
required: true
type: string
build_dir:
required: true
type: string
# values: Release, Debug
build_type:
required: false
type: string
default: 'Release'
build_glib:
required: false
type: string
default: 'ON'
build_glibmm:
required: false
type: string
default: 'ON'
build_qt:
required: false
type: string
default: 'ON'
build_std:
required: false
type: string
default: 'ON'
build_tests:
required: false
type: string
default: 'ON'
build_examples:
required: false
type: string
default: 'ON'
codecoverage:
required: false
type: string
default: 'OFF'

runs:
using: "composite"

steps:
# --------------------------------- Ubuntu build ---------------------------------
- uses: awalsh128/cache-apt-pkgs-action@v1.2.2
if: ${{ (inputs.platform == 'ubuntu') && ((inputs.build_glib == 'ON') || (inputs.build_glibmm == 'ON')) }}
with:
packages: libglibmm-2.4-dev
version: 1.0

- name: Install Qt (Ubuntu)
if: ${{ (inputs.platform == 'ubuntu') && (inputs.build_qt == 'ON') }}
uses: jurplel/install-qt-action@v3
with:
version: '6.4.*'
host: 'linux'
target: 'desktop'
arch: 'gcc_64'
modules: ''
cache: 'true'
cache-key-prefix: 'install-qt-action-linux'
set-env: 'true'

- name: Configure CMake (Ubuntu)
if: ${{ inputs.platform == 'ubuntu' }}
shell: bash
run: |
cmake -B ${{ inputs.build_dir }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
-DHSMBUILD_VERBOSE=OFF \
-DHSMBUILD_DISPATCHER_GLIB=${{ inputs.build_glib }} \
-DHSMBUILD_DISPATCHER_GLIBMM=${{ inputs.build_glibmm }} \
-DHSMBUILD_DISPATCHER_STD=${{ inputs.build_std }} \
-DHSMBUILD_DISPATCHER_QT=${{ inputs.build_qt }} \
-DHSMBUILD_TESTS=${{ inputs.build_tests }} \
-DHSMBUILD_EXAMPLES=${{ inputs.build_examples }} \
-DHSMBUILD_CODECOVERAGE=${{ inputs.codecoverage }} \
${{ inputs.src_dir }}
- name: Build (Ubuntu)
if: ${{ inputs.platform == 'ubuntu' }}
shell: bash
run: cmake --build ${{ inputs.build_dir }} --parallel 2 --config ${{ inputs.build_type }}

# --------------------------------- Windows build ---------------------------------
- name: Install Qt (Windows)
if: ${{ (inputs.platform == 'windows') && (inputs.build_qt == 'ON') }}
uses: jurplel/install-qt-action@v3
with:
version: '6.4.*'
host: 'windows'
target: 'desktop'
arch: 'win64_msvc2019_64'
modules: ''
cache: 'true'
cache-key-prefix: 'install-qt-action-win32'
set-env: 'true'

- name: Configure CMake (Windows)
if: ${{ inputs.platform == 'windows' }}
shell: bash
run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ^
-DHSMBUILD_VERBOSE=OFF ^
-DHSMBUILD_DISPATCHER_GLIB=OFF ^
-DHSMBUILD_DISPATCHER_GLIBMM=OFF ^
-DHSMBUILD_DISPATCHER_STD=ON ^
-DHSMBUILD_DISPATCHER_QT=ON ^
-DHSMBUILD_TESTS=ON ^
-DHSMBUILD_EXAMPLES=ON

- name: Build (Windows)
if: ${{ inputs.platform == 'windows' }}
shell: bash
run: cmake --build ${{github.workspace}}\build --parallel 2 --config ${{env.BUILD_TYPE}}
75 changes: 0 additions & 75 deletions .github/workflows/common/build_ubuntu.yml

This file was deleted.

18 changes: 11 additions & 7 deletions .github/workflows/get-commit-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,26 @@ outputs:

runs:
using: "composite"
# version_check:
# name: Generate output
# runs-on: ubuntu-latest
# outputs:
# head_version: ${{ steps.read_head_version.outputs.head_version }}
# commit_version: ${{ steps.read_commit_version.outputs.commit_version }}

steps:
- id: read_head_version
shell: bash
if: ${{ inputs.commit_sha == '' }}
run: |
cd "${{ inputs.repo_dir }}"
echo "head_version=$(git log -1 --pretty=format:"%s" | grep -Po '\[([\d.]+)\]')" >> $GITHUB_OUTPUT
- if: ${{ inputs.commit_sha == '' }}
shell: bash
run: |
echo "VERSION: '${{ steps.read_head_version.outputs.head_version }}'"
- id: read_commit_version
shell: bash
if: ${{ inputs.commit_sha != '' }}
run: |
cd "${{ inputs.repo_dir }}"
echo "commit_version=$(git log -1 ${{ inputs.commit_sha }} --pretty=format:"%s" | grep -Po '\[([\d.]+)\]')" >> $GITHUB_OUTPUT
echo "commit_version=$(git log -1 ${{ inputs.commit_sha }} --pretty=format:"%s" | grep -Po '\[([\d.]+)\]')" >> $GITHUB_OUTPUT
- if: ${{ inputs.commit_sha != '' }}
shell: bash
run: |
echo "VERSION: '${{ steps.read_commit_version.outputs.head_version }}'"

0 comments on commit 031796b

Please sign in to comment.