Skip to content

Commit

Permalink
chore(ci): mac arm64 and universal binary support
Browse files Browse the repository at this point in the history
  • Loading branch information
alphagocc committed Mar 18, 2022
1 parent 1259b69 commit bdba762
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/macos-qt6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ name: MacOS Qt6
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'BUILD.md'
- "README.md"
- "LICENSE"
- "BUILD.md"
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'BUILD.md'
- "README.md"
- "LICENSE"
- "BUILD.md"
release:
types: [published]
jobs:
Expand All @@ -20,6 +20,7 @@ jobs:
matrix:
os: [macos-latest]
build_type: [Release, RelWithDebInfo]
arch: [x86_64, arm64, x86_64;arm64]
qt_ver: [6.2.3]
qt_arch: [clang_64]
env:
Expand All @@ -45,7 +46,8 @@ jobs:
-DLEMON_QT6=ON \
-DLEMON_BUILD_INFO="Build for macOS" \
-DLEMON_BUILD_EXTRA_INFO="Build on $(uname -sr)" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \
-DCMAKE_OSX_ARCHITECTURES="${{ matrix.arch }}"
cmake --build . --parallel $(sysctl -n hw.logicalcpu)
# tag 打包
- name: package
Expand All @@ -59,13 +61,13 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v2-preview
with:
name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}.dmg
name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}-${{ matrix.arch }}.dmg
path: ${{ env.targetName }}.dmg
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./${{ env.targetName }}.dmg
asset_name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}.dmg
asset_name: ${{ env.targetName }}-Qt${{ matrix.qt_ver }}-${{ matrix.build_type }}-${{ matrix.arch }}.dmg
tag: ${{ github.ref }}
2 changes: 1 addition & 1 deletion makespec/BUILDVERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
212
213
1 change: 1 addition & 0 deletions src/compilersettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ auto CompilerSettings::checkValid() -> bool {
compilerNames.append(i->getCompilerName());
}

// n^2?
for (int i = 0; i < compilerList.size(); i++) {
if (compilerNames.count(compilerNames[i]) > 1) {
ui->compilerList->setFocus();
Expand Down
4 changes: 0 additions & 4 deletions src/core/contest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,6 @@ void Contest::clearPath(const QString &curDir) {

void Contest::judge(const QVector<std::pair<Contestant *, int>> &judgingTasks) {
stopJudging = false;
// emit contestantJudgingStart(contestant->getContestantName());

controller = new JudgingController(settings);

// connect(controller, &JudgingController::judgeFinished, this, &Contest::judgeFinished);
Expand Down Expand Up @@ -205,8 +203,6 @@ void Contest::judge(const QVector<std::pair<Contestant *, int>> &judgingTasks) {
delete eventLoop;
delete controller;
controller = nullptr;
/* emit contestantJudgedDisplay(contestant->getContestantName(), contestant->getTotalScore(),
getTotalScore()); */
emit contestantJudgingFinished();
}

Expand Down

0 comments on commit bdba762

Please sign in to comment.