Build toolchain #14
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: Build toolchain | |
on: | |
# 清理 Cache 后触发 | |
workflow_run: | |
workflows: [Cleanup caches by a branch] | |
types: completed | |
# 手动触发 | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- windows-latest | |
- windows-2019 | |
- macos-latest | |
- ubuntu-latest | |
qt_ver: | |
- 6.6.1 | |
steps: | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
install-deps: 'true' | |
modules: 'qt5compat qtnetworkauth qtmultimedia qtimageformats' | |
cache: 'true' | |
- name: Install dependencies on windows | |
if: startsWith(matrix.os, 'windows') | |
shell: bash | |
run: | | |
choco install ninja | |
ninja --version | |
cmake --version | |
vcpkg install breakpad ffmpeg[opengl,ass,bzip2,freetype,fribidi,zlib,gpl] --triplet x64-windows | |
- name: Install dependencies on macos | |
if: startsWith(matrix.os, 'macos') | |
shell: bash | |
run: | | |
brew install ninja nasm pkg-config | |
ninja --version | |
cmake --version | |
clang --version | |
vcpkg install breakpad ffmpeg[opengl,ass,bzip2,freetype,fribidi,zlib,gpl] --triplet x64-osx | |
- name: Install dependencies on ubuntu | |
if: startsWith(matrix.os, 'ubuntu') | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install ninja-build nasm build-essential libgl1-mesa-dev | |
ninja --version | |
cmake --version | |
gcc --version | |
vcpkg install breakpad ffmpeg[opengl,ass,bzip2,freetype,fribidi,zlib,gpl] --triplet x64-linux | |
- name: cache windows vcpkg | |
if: startsWith(matrix.os, 'windows') | |
uses: actions/cache/save@v3 | |
with: | |
path: C:\vcpkg\installed | |
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }} | |
- name: cache macos or ubuntu vcpkg | |
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') | |
uses: actions/cache/save@v3 | |
with: | |
path: /usr/local/share/vcpkg/installed | |
key: ${{ runner.os }}-vcpkg-installed-${{ matrix.os }} | |