Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【検証】忍者 vs Visual Studio 15 2017 #956

Closed

Conversation

berryzplus
Copy link
Contributor

@berryzplus berryzplus commented Jul 6, 2019

PR の目的

cmakeのジェネレータ「ninja」の有効性を検証します。

現在利用中の「Visual Studio 15 2017」と同じ条件で10回ずつコンフィグ&ビルドを行ってビルドにかかる所要時間を比較できるようにします。

カテゴリ

  • 速度向上
  • ビルド手順
  • CI関連
    • Appveyor
    • Azure Pipelines
    • その他連携サービス

PR の背景

現在のビルドスクリプトは、Visual Studioジェネレータを使っています。
Visual Studioジェネレータを使うにはバージョン指定が必須なので、
当初唯一の対応環境だった「vs2017」向けのスクリプトが作られました。

つい先日(もう3か月前ですが)vs2019がリリースされたので、対応環境は「唯一」ではなくなっていまいました。

visual studioジェネレータを使う限り、バージョンの問題は付いて回ります。

他に解決策はないものか?と検討しているうちに、普段ぼくのローカルで活躍している忍者クンをappveyorで稼働させてみる作戦に気付いたわけです。

PR のメリット

このPRはマージ目的じゃないんで、とくにありません。

PR のデメリット (トレードオフとかあれば)

このPRはマージ目的じゃないんで、とくにありません。

PR の影響範囲

プロジェクトのビルド。
サクラエディタの機能には一切影響しません。

関連チケット

参考資料

tests/create-project-test.batだけを実行するように変更
忍者 vs Visual Studioジェネレータ。
@berryzplus
Copy link
Contributor Author

操作ミスってテンプレのまま送信してしまいました...orz

appveyorのビルド結果を共有するのがこのPRの目的です。
各環境10回ずつ GoogleTest のコンフィグ&ビルドが走るので、
ビルド結果みて「ふ~ん」と思えるまでには結構かかるんじゃないかと思っています。

@berryzplus
Copy link
Contributor Author

berryzplus commented Jul 6, 2019

Win32 - Debugのビルドログから所要時間を抽出してみました。

項目 Ninja Visual Studio 15 2017
最小値 5s 54s
最大値 6s 58s
平均値 5s 55s

忍者圧勝 😄

@berryzplus berryzplus changed the title Pendings/ninja vs msvc 【検証】忍者 vs Visual Studio 15 2017 Jul 6, 2019
- cmd: |
pip install openpyxl --user
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm mingw-w64-x86_64-gtest"
- cup vswhere
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://chocolatey.org/packages/vswhere
アップデートできるんですね。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://chocolatey.org/packages/vswhere
アップデートできるんですね。

何故かappveyor/azure pipelinesに共通のコマンドみたいです。
vswhereのバージョンがvs2017搭載版よりも古いのも共通...orz

cup vswhereだけ先出しでPR出しちゃおうかとも思っています。

@AppVeyorBot
Copy link

@AppVeyorBot
Copy link

@berryzplus
Copy link
Contributor Author

ん?さっき入れたコメントが反映されておらん・・・。
さっきキャンセルしたレビューに含まれていたのかしら?:sob:

@berryzplus
Copy link
Contributor Author

pacman でパッケージをインストールした場合の所要時間は2秒みたいです。
https://ci.appveyor.com/project/sakuraeditor/sakura/builds/26289857/job/q4r48o213j3bc6uc

方法 時間
Visual Studio 15 2017 Generator 1分
Ninja Generator 5秒
ビルドせずパッケージを使う 2秒

パッケージ使いたかった動機(=1分かかる)は、Ninjaへの鞍替えで解消できそうな気がしていますが、実行時間を見ると「それだけ」じゃ少し弱い気もしています。数字的にアレですが、倍の時間がかかっちゃってますので。

元々使うつもりだった「 GMock を使うために変更」ってのがしっくり来る感じなのかなぁ。

@beru beru added the no-changelog 【ChangeLog除外】 label Aug 9, 2019
@beru
Copy link
Contributor

beru commented Aug 9, 2019

マージ目的ではないという事で Close します。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog 【ChangeLog除外】
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants