mirror of
https://github.com/redstrate/Auracite.git
synced 2025-05-09 03:57:44 +00:00
159 lines
10 KiB
YAML
159 lines
10 KiB
YAML
name: Main
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
QT_VERSION: 6.6
|
|
KF_VERSION: v6.11.0
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/cache@v4
|
|
id: cache-deps
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
version: "${{ env.QT_VERSION }}.*"
|
|
cache: true
|
|
modules: 'qtshadertools'
|
|
- name: Setup Linux dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install \
|
|
gettext \
|
|
gperf \
|
|
libwayland-dev
|
|
- name: Set reusable strings
|
|
id: strings
|
|
shell: bash
|
|
run: |
|
|
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
|
|
echo "prefix-dir=${{ github.workspace }}/prefix" >> "$GITHUB_OUTPUT"
|
|
- name: Cache Prefix
|
|
id: cache-prefix-restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: ${{ steps.strings.outputs.prefix-dir }}
|
|
key: ${{ runner.os }}-prefix
|
|
- name: Build Extra CMake Modules
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone https://invent.kde.org/frameworks/extra-cmake-modules.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-ECM -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -S extra-cmake-modules -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-ECM --target install
|
|
cmake --install ${{ steps.strings.outputs.build-output-dir }}-ECM
|
|
- name: Configure KI18n
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/ki18n.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-ki18n -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -S ki18n -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
- name: Build KI18n
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-ki18n --target install
|
|
- name: Build KCoreAddons
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcoreaddons.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kca -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -S kcoreaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kca --target install
|
|
- name: Build KCrash
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcrash.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcrash -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -S kcrash -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcrash --target install
|
|
- name: Build KConfig
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kconfig.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kconfig -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kconfig -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kconfig --target install
|
|
- name: Build KArchive
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/karchive.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-karchive -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S karchive -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DWITH_LIBZSTD=OFF # TODO: enable bzip which we need later
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-karchive --target install
|
|
- name: Build Breeze Icons
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/breeze-icons.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-breeze-icons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S breeze-icons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DICONS_LIBRARY=ON -DSKIP_INSTALL_ICONS=ON -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-breeze-icons --target install
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-breeze-icons --target install
|
|
- name: Build KGuiAddons
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kguiaddons.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kguiaddons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kguiaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF -DWITH_WAYLAND=OFF -DWITH_X11=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kguiaddons --target install
|
|
- name: Build KWidgetsAddons
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kwidgetsaddons.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kwidgetsaddons -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kwidgetsaddons -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kwidgetsaddons --target install
|
|
- name: Build KColorScheme
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcolorscheme.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcolorscheme -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kcolorscheme -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcolorscheme --target install
|
|
- name: Build KIconThemes
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kiconthemes.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kiconthemes -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kiconthemes -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kiconthemes --target install
|
|
- name: Build KCodecs
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kcodecs.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kcodecs -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kcodecs -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kcodecs --target install
|
|
- name: Build KConfigWidgets
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
continue-on-error: true
|
|
run: |
|
|
git clone --depth 1 --branch ${{ env.KF_VERSION }} https://invent.kde.org/frameworks/kconfigwidgets.git
|
|
cmake -B ${{ steps.strings.outputs.build-output-dir }}-kconfigwidgets -DCMAKE_PREFIX_PATH=${{ steps.strings.outputs.prefix-dir }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -S kconfigwidgets -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.prefix-dir }} -DBUILD_TESTING=OFF
|
|
cmake --build ${{ steps.strings.outputs.build-output-dir }}-kconfigwidgets --target install
|
|
- name: Save Prefix
|
|
id: cache-prefix-save
|
|
uses: actions/cache/save@v4
|
|
if: steps.cache-prefix-restore.outputs.cache-hit != 'true'
|
|
with:
|
|
path: ${{ steps.strings.outputs.prefix-dir }}
|
|
key: ${{ steps.cache-prefix-restore.outputs.cache-primary-key }}
|
|
- name: Build
|
|
run: |
|
|
export CMAKE_PREFIX_PATH=${{ github.workspace }}/prefix/lib/x86_64-linux-gnu/cmake
|
|
cargo build --verbose
|
|
- name: Run clippy
|
|
run: |
|
|
export CMAKE_PREFIX_PATH=${{ github.workspace }}/prefix/lib/x86_64-linux-gnu/cmake
|
|
cargo clippy
|