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

Azure Pipelinesの除外条件を更新する #1791

Merged
2 commits merged into from Feb 11, 2022
Merged

Azure Pipelinesの除外条件を更新する #1791

2 commits merged into from Feb 11, 2022

Conversation

ghost
Copy link

@ghost ghost commented Feb 9, 2022

PR の目的

実行条件を更新し、いずれのCIも同じ条件でトリガーされるようにする。

カテゴリ

  • ビルド関連
    • Azure Pipelines

PR の背景

Azure Pipelinesの実行条件のうち、除外ファイルの指定内容がほかのCIと異なっているため、編集したファイルによっては必要ないにも関わらずCIが実行されてしまいます。
他のCIに揃える形で条件を統一し、確実に抑止されるようにします。

PR のメリット

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

仕様・動作説明

かつてAzure Pipelinesはワイルドカードに対応していなったため、 #1502 で対象ファイルを個別に列挙していますが、この方法では新たに除外対象とすべきファイルがリポジトリに追加されたときに更新を忘れる可能性があります。
幸い昨年9月にワイルドカードへの対応が実施されたので、他と同様にワイルドカードで指定するように改めます。

また、.editorconfigについてもAzure Pipelinesだけは除外対象となっておらず、代わりにTravis CIの設定ファイルが除外対象とされていることから、前者の追加と後者の削除を行います。
現時点でTravis CIは導入されておらず、当該設定ファイルも存在しませんので、除外から外しても問題はないはずです。

PR の影響範囲

  • Azure Pipelinesのすべてのジョブ

テスト内容

あらかじめ ./installer/Languages/README.md を編集して、すべてのCIが実行されないことを確認済みです。
なお、このファイルは現時点で除外対象から漏れています。

関連 issue, PR

#1494#1498#1500#1501#1502
#1787

参考資料

Support for wild cards and conditional expressions in YAML pipeline files | Microsoft Docs

@ghost ghost added the azure pipelines label Feb 9, 2022
Copy link
Contributor

@berryzplus berryzplus left a comment

Choose a reason for hiding this comment

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

参考までに思ったことを書き残しておきます。

「全CIで除外条件を揃える」の解釈がやや微妙で、
同じにしたら全CIでAZPのCI設定の変更を無視することになるじゃないか!
とアフォなツッコミする子が出る可能性があるなぁ、と思いました。
そういうお茶目、オイラは好きですがw

@@ -6,32 +6,11 @@
trigger:
paths:
exclude:
- .github/*
- '**/*.md'
- '.github/*'
Copy link
Contributor

Choose a reason for hiding this comment

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

参考。引用符で括った場合と括らない場合で挙動に差はなかった記憶です。

Copy link
Author

Choose a reason for hiding this comment

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

ここは構文エラーになったので変更しました。

- .gitignore
- .travis.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

参考。サクラエディタは travis-CI でのビルドを想定してないです。
パクってきたテンプレに書いてあったから誤って混入してた認識です。
導入時に突っ込んで黙認した記憶があります。
削ってしまって問題ないはずです。

- .gitignore
- .travis.yml
- .editorconfig
- appveyor.yml
Copy link
Contributor

Choose a reason for hiding this comment

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

参考。これは残しておくのが正しい(これで問題ない)の認識です。

- tools/macro/macro.md
- tools/zip/readme.md
- tests/unittest.md
- vcx-props/project-PlatformToolset.md
Copy link
Contributor

Choose a reason for hiding this comment

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

参考。この変更により、すべてのmarkdownをここに列挙しなくても良くなります。

  • 追加や削除、変更があったときにCI設定を修正しなくてよくなるということです。
  • markdownをソースにしてプログラムに情報を埋め込む仕様は、採用しにくくなるということです。
    需要があるかどうかは別にして。

@berryzplus
Copy link
Contributor

たぶんこういうことっす。

■実行環境×除外設定マトリクス

環境\除外 GHA AZP Appveyor
GHA -
AZP -
Appveyor -

■ターゲット×除外設定マトリクス

ターゲット\除外 MSVC設定 MinGW Makefile
MSVC -
MinGW -

@ghost
Copy link
Author

ghost commented Feb 9, 2022

同じにしたら全CIでAZPのCI設定の変更を無視することになるじゃないか!

気づくだろうと思ったので敢えて書きませんでしたが、このPRでは環境ごとに違えるべき条件以外を「全環境で統一する」のが目的ですので、各CIの設定ファイルを変更しても無視されることはありません。
設定ファイルに関する除外条件はマトリクスの通りです。

@ghost
Copy link
Author

ghost commented Feb 11, 2022

レビューありがとうございます。
マージします。

@ghost ghost merged commit 67131ff into sakura-editor:master Feb 11, 2022
@ghost ghost deleted the feature/change_ci_trigger_contain_excluded_files branch February 11, 2022 13:22
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant