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

Use AppVeyor to build Windows packages #226

Closed
kou opened this issue Feb 12, 2019 · 24 comments
Closed

Use AppVeyor to build Windows packages #226

kou opened this issue Feb 12, 2019 · 24 comments

Comments

@kou
Copy link
Member

kou commented Feb 12, 2019

No description provided.

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

現状はMariaDBの各種バージョンのデバッグビルドのみなので
https://github.com/cosmo0920/PowerShell-for-Mroonga-building を組み込むことを考える。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

matrixにWindowsパッケージ作成のみのを追加するのがよさそう
(従来通り複数バージョンでのビルドがパスすることの確認は継続で、動作確認につかえるパッケージ用のが1つあるイメージ)

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

https://github.com/cosmo0920/PowerShell-for-Mroonga-building はリリース版もしくはnightlyのみ対応
http://packages.groonga.org/nightly/
まずはnightlyでつくれるようにしよう。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

https://github.com/cosmo0920/PowerShell-for-Mroonga-building#execution-order-ps1-if-it-executes-individually で個別実行でビルドすれば特に手をいれなくてもよさそう。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

nightlyそのままだとうれしくないか。nightly版のmroongaをmasterに置き換えるほうが妥当そう。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

↑を利用してビルドが走るところまでは確認できた。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

.install-mroonga.ps1でとまる。
RDPでつないで実行してみるとそんなことはないみたい。
@cosmo0920 さんにあとで聞いてみよう。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

#230 いったんdraftのPRに。

@kenhys
Copy link
Member

kenhys commented Feb 18, 2019

https://ci.appveyor.com/project/kenhys/mroonga/builds/22447636/job/amhhp39tdy2e6ah9
途中で止まっていたときのログ

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

以前試したがうまくいかなかった(原因はよくわらない)というフィードバックを得た。

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

そもそも、以下のようにmysqldが起動できていない。

cmd /c 'start .\bin\mysqld.exe'

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

ただし、Start-Process .\bin\mysqld.exe では起動できた。

@cosmo0920
Copy link
Member

cosmo0920 commented Feb 19, 2019

Start-Processで上げっぱなしだとCIが終了しない気がするので、以下のようにするとmysqldを終了できる気がします。

PS> $job = Start-Process .\bin\mysqld.exe -NoNewWindow -PassThru
PS> $Env:MYSQLD_JOB_ID = $job.Id
PS> Stop-Process -Id $Env:MYSQLD_JOB_ID 

あ、でもすぐに終了するなら環境変数に入れなくてもいいか。
👇で十分ですね。

PS> $job = Start-Process .\bin\mysqld.exe -NoNewWindow -PassThru
PS> Stop-Process -Id $job.Id

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

リダイレクトが制限されている。

+ #  cmd /c ".\bin\mysql.exe -uroot <$installSqlDir\install.sql"
+                                   ~
The '<' operator is reserved for future use.

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

shutdownするようになっているからそこが動けば大丈夫なはず。

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

cmd /c "type $installSqlDir\install.sql | .\bin\mysql.exe -uroot"

とか

  Start-Process ".\bin\mysql.exe" -ArgumentList "-uroot < .\share\mroonga\install.sql"

ではshow enginesしても反映されていないみたい。実行自体はエラーになっていなさそうなんだが。

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

Get-Content "$installSqlDir\install.sql" | .\bin\mysql.exe -uroot

するといいんじゃないかと教えてもらって試したらいけた。

@kenhys
Copy link
Member

kenhys commented Feb 19, 2019

なおしたやつはPRとして投げた。
cosmo0920/PowerShell-for-Mroonga-building#8

@kenhys
Copy link
Member

kenhys commented Feb 20, 2019

zipにするまえにビルドでこけていた。

(ClCompile target) -> 
  C:\projects\mrnbuild\powershell\work\source\storage\mroonga\vendor\groonga\include\groonga.h(22): fatal error C1083: Cannot open include file: 'groonga/version.h': No such file or directory (compiling source file C:\projects\mrnbuild\powershell\work\source\storage\mroonga\ha_mroonga.cpp) [C:\projects\mrnbuild\powershell\work\build-vc2015-zip-64\storage\mroonga\mroonga.vcxproj]
% find  source -name version.h
source/storage/rocksdb/rocksdb/include/rocksdb/version.h
source/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/src/liblzma/api/lzma/version.h
source/storage/mroonga/vendor/groonga/vendor/mruby-source/include/mruby/version.h
source/storage/mroonga/vendor/groonga/vendor/ngx_mruby-source/mruby/include/mruby/version.h
source/storage/mroonga/vendor/groonga/vendor/mecab-0.996/swig/version.h
% find mariadb-10.3.12-with-mroonga-9.00-for-windows -name version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/rocksdb/rocksdb/include/rocksdb/version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/tokudb/PerconaFT/third_party/xz-4.999.9beta/src/liblzma/api/lzma/version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/mroonga/vendor/groonga/vendor/mruby-source/include/mruby/version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/mroonga/vendor/groonga/vendor/ngx_mruby-source/mruby/include/mruby/version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/mroonga/vendor/groonga/vendor/mecab-0.996/swig/version.h
mariadb-10.3.12-with-mroonga-9.00-for-windows/storage/mroonga/vendor/groonga/include/groonga/version.h

@kenhys
Copy link
Member

kenhys commented Feb 20, 2019

version.hはあらかじめ生成されている前提だった。groongaがリリース版じゃないからね。

@kenhys
Copy link
Member

kenhys commented Feb 20, 2019

こんな感じでbase_versionから生成できそう。

  - ps: Get-Content ..\groonga\base_version | ForEach-Object { $env:GROONGA_VERSION = $_ }
  - ps: Get-Content ..\groonga\include\groonga\version.h.in | ForEach-Object { $_ -replace "@GRN_VERSION@","$env:GROONGA_VERSION" } | Set-Content ..\groonga\include\groonga\version.h

@kenhys
Copy link
Member

kenhys commented Feb 20, 2019

versions.ps1の書き換え(ただし10.3.12のみ対象にしているからあまり意味はないとversion.hの問題に対処したはずなので様子見。
https://ci.appveyor.com/project/kenhys/mroonga/builds/22507438/job/mtkvwluhw259leow
これが問題なかったら、通しで流してみる。

@kenhys
Copy link
Member

kenhys commented Feb 25, 2019

成果物はPRにまとめた。
#230

@kenhys
Copy link
Member

kenhys commented Mar 31, 2019

#230 がマージされたのでclose

@kenhys kenhys closed this as completed Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants