This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
Revert "Bump run-vcpkg to 11.4" #1095
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/release.yml' | |
- '.gitignore' | |
- 'crowdin.yml' | |
- 'data/translations/**' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
- '.github/workflows/release.yml' | |
- '.gitignore' | |
- 'crowdin.yml' | |
- 'data/translations/**' | |
jobs: | |
validate-metainfo: | |
name: Validate metainfo | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Install AppStream metadata utility | |
run: | | |
sudo apt-get update | |
sudo apt-get install appstream-util | |
- name: Validate metainfo | |
run: appstream-util validate-relax data/io.crow_translate.CrowTranslate.metainfo.xml | |
format: | |
name: Format | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Check formatting | |
uses: DoozyX/clang-format-lint-action@v0.15 | |
with: | |
clangFormatVersion: 12 | |
build: | |
name: Build | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, windows-2019] | |
include: | |
- os: ubuntu-20.04 | |
extra-cmake-arguments: >- | |
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror" | |
- os: windows-2019 | |
extra-cmake-arguments: >- | |
-D CMAKE_TOOLCHAIN_FILE=$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake | |
-D VCPKG_TARGET_TRIPLET=x64-windows | |
-D VCPKG_INSTALL_OPTIONS=--clean-after-build | |
-D X_VCPKG_APPLOCAL_DEPS_INSTALL=ON | |
-D CMAKE_CXX_FLAGS="/experimental:external /external:anglebrackets /external:W0 /W4 /wd4530 /WX" | |
-D CMAKE_CXX_CLANG_TIDY='clang-tidy;--warnings-as-errors=*' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install apt packages | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install extra-cmake-modules libqt5x11extras5-dev qttools5-dev qtmultimedia5-dev libkf5wayland-dev libtesseract-dev ninja-build | |
- name: Install vcpkg | |
uses: lukka/run-vcpkg@v10.7 | |
if: runner.os == 'Windows' | |
with: | |
vcpkgGitCommitId: a42af01b72c28a8e1d7b48107b33e4f286a55ef6 | |
- name: Setup MSVC | |
if: runner.os == 'Windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
# See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4766#note_1091927 | |
- name: Downgrade CMake | |
if: runner.os == 'Windows' | |
uses: lukka/get-cmake@v3.21.2 | |
- name: Build | |
run: | | |
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=Release -D WITH_PORTABLE_MODE=ON -DCMAKE_INSTALL_PREFIX=install ${{ matrix.extra-cmake-arguments }} | |
cmake --build build --parallel 2 --target install | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: crow-translate-${{ matrix.os }} | |
path: install/** |