更新 持续集成中 MacOS 的版本为 11.0 #109
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: macOS Build and Test | |
on: | |
push: | |
paths: | |
- 'App/**' | |
- 'Tester/**' | |
- '.github/workflows/macos.yml' | |
pull_request: | |
paths: | |
- 'App/**' | |
- 'Tester/**' | |
- '.github/workflows/macos.yml' | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-11.0] | |
qt_ver: [6.2.2] | |
qt_arch: [clang_64] | |
env: | |
targetName: PolyChatApp | |
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 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
cached: 'false' | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Build on macOS | |
run: | | |
cd ./App | |
qmake | |
make | |
test: | |
# needs 添加层级关系,上面的执行完了。这个才会执行 | |
needs: build | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# macos-10.15 Github 不再支持 | |
os: [macos-11.0] | |
qt_ver: [6.2.2] | |
qt_arch: [clang_64] | |
env: | |
targetName: PolyChatTester | |
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 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{ matrix.qt_ver }} | |
cached: 'false' | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1 | |
- name: Test on macOS | |
run: | | |
cd ./Tester | |
ls | |
qmake CONFIG+=debug | |
make | |
ls | |
./PolyChatTester -v2 -txt | |
echo '\n\n==============================./PolyChatTester -txt==============================\n\n' | |
./PolyChatTester -txt |