Skip to content

Commit

Permalink
Added GitHub Actions CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
redtide committed Jan 16, 2024
1 parent af4f99e commit 5bb56ae
Showing 1 changed file with 76 additions and 0 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build
on:
push:
branches:
- '*'
tags:
- '[0-9]*'
pull_request:
branches:
- '*'
defaults:
run:
shell: bash
env:
build_type: Release
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
strategy:
matrix:
qt_version: [5, 6]
config:
- { name: "GCC", cc: gcc, cxx: g++ }
- { name: "clang", cc: clang, cxx: clang++ }
env:
cc: ${{ matrix.config.cc }}
cxx: ${{ matrix.config.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Checkout DBusMenu
uses: actions/checkout@v3
with:
repository: qtilities/libdbusmenu-qtilities
path: libdbusmenu-qtilities

- name: Update Packages
run: sudo apt-get update

- name: Install Dependencies
run: |
sudo apt-get install doxygen \
${{ matrix.qt_version == 5
&& 'qtbase5-dev qttools5-dev'
|| 'qt6-base-dev libgl1-mesa-dev qt6-l10n-tools qt6-tools-dev qt6-tools-dev-tools'
}}
- name: Build and install DBusMenu
working-directory: ${{ github.workspace }}/libdbusmenu-qtilities
run: |
options=(
-B build
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
-D CMAKE_INSTALL_PREFIX="/usr"
-D PROJECT_QT_VERSION=${{ matrix.qt_version }}
)
cmake ${options[@]}
cmake --build build --config ${{ env.build_type }}
sudo cmake --install build
- name: Configure
run: |
options=(
-B build
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
-D CMAKE_INSTALL_PREFIX="/usr"
-D PROJECT_QT_VERSION=${{ matrix.qt_version }}
)
cmake ${options[@]}
- name: Build
run: cmake --build build --config ${{ env.build_type }}

0 comments on commit 5bb56ae

Please sign in to comment.