Skip to content

Build toolchain

Build toolchain #12

Workflow file for this run

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
libs:
- breakpad giflib
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_ver }}
install-deps: 'true'
modules: 'qt5compat qtnetworkauth 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 ${{ matrix.libs }} --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 ${{ matrix.libs }} --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 ${{ matrix.libs }} --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 }}