goldendict-ng/.github/workflows/macos-PR-check.yml

71 lines
2 KiB
YAML
Raw Normal View History

2022-04-24 01:18:19 +00:00
name: macos-PR-check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
2022-04-24 01:18:19 +00:00
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
- staged
paths-ignore:
- 'docs/**'
# - ".github/**"
2022-04-24 01:18:19 +00:00
- "howto/**"
- "*.md"
- "locale/**"
2022-04-24 01:18:19 +00:00
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-11.0]
2023-03-26 03:39:51 +00:00
qt_ver: [5.15.2,6.4.3]
2022-04-24 01:18:19 +00:00
qt_arch: [clang_64]
steps:
# macos 11.0 默认环境变了,要指定
- name: prepare env
if: ${{ matrix.os == 'macos-11.0' }}
run: |
softwareupdate --all --install --force
sudo xcode-select --print-path
sudo xcode-select --switch /Library/Developer/CommandLineTools
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install Qt
if: ${{ matrix.qt_ver == '5.15.2' }}
uses: jurplel/install-qt-action@v3
2022-04-24 01:18:19 +00:00
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
modules: qtwebengine
setup-python: 'false'
2022-04-24 01:18:19 +00:00
- name: Install Qt
if: ${{ matrix.qt_ver != '5.15.2' }}
uses: jurplel/install-qt-action@v3
2022-04-24 01:18:19 +00:00
with:
version: ${{ matrix.qt_ver }}
arch: ${{ matrix.qt_arch }}
cached: 'false'
2023-03-26 03:39:51 +00:00
modules: qtwebengine qtwebchannel qtpositioning qt5compat qtmultimedia qtimageformats qtspeech
2022-04-24 01:18:19 +00:00
setup-python: 'false'
2022-04-24 01:18:19 +00:00
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
2022-04-24 01:18:19 +00:00
2023-04-28 01:52:23 +00:00
- name: install deps on macos
2022-04-24 01:18:19 +00:00
run: |
brew uninstall opencc hunspell ffmpeg@5 ffmpeg@4 xz lzo libogg libvorbis zstd || true
2022-04-24 01:18:19 +00:00
brew install create-dmg
qmake CONFIG+=release CONFIG+=zim_support CONFIG+=chinese_conversion_support #QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64"
2022-04-24 01:18:19 +00:00
make -j$(nproc)