{"id":2230,"date":"2019-12-17T00:00:00","date_gmt":"2019-12-16T15:00:00","guid":{"rendered":"https:\/\/blog.ymyzk.com\/?p=2230"},"modified":"2019-12-16T23:40:33","modified_gmt":"2019-12-16T14:40:33","slug":"github-actions-for-python-projects","status":"publish","type":"post","link":"https:\/\/blog.ymyzk.com\/2019\/12\/github-actions-for-python-projects\/","title":{"rendered":"GitHub Actions \u3092\u6d3b\u7528\u3057\u305f Python \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e CI"},"content":{"rendered":"\n
\u3053\u306e\u8a18\u4e8b\u306f CAMPHOR- Advent Calendar 2019<\/a> 17\u65e5\u76ee\u306e\u8a18\u4e8b\u3067\u3059\uff0e16\u65e5\u76ee\u306e\u8a18\u4e8b\u306f \uff20kmconner<\/a> \u306e\u300c\u5bb6\u306e\u96fb\u6c17\u4f7f\u7528\u91cf\u3092\u53ef\u8996\u5316\u3059\u308b<\/a>\u300d\u3067\u3057\u305f\uff0e<\/p>\n\n\n\n \u3053\u306e\u8a18\u4e8b\u3067\u306f\uff0c\u5148\u65e5\u516c\u958b\u3055\u308c\u305f CI\/CD \u30c4\u30fc\u30eb GitHub Actions<\/a> \u3092 Python \u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e CI \u306b\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u4e3b\u306b GitHub Actions \u4e0a\u3067\u306e\u4ee5\u4e0b\u306e\u5185\u5bb9\u306b\u3064\u3044\u3066\u30ab\u30d0\u30fc\u3057\u307e\u3059:<\/p>\n\n\n\n \u3053\u3053\u3067\u306f WSGI \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u305f\u3081\u306e\u30e9\u30a4\u30f3\u30d7\u30ed\u30d5\u30a1\u30a4\u30e9 wsgi_lineprof \u3067\u5229\u7528\u3057\u3066\u3044\u308b\u8a2d\u5b9a\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u8aac\u660e\u306f\u4e0d\u8981\u306a\u306e\u3067\u3068\u306b\u304b\u304f\u8a2d\u5b9a\u3092\u77e5\u308a\u305f\u3044\u3068\u3044\u3046\u65b9\u306f\uff0c\u76f4\u63a5\u3053\u3061\u3089\u306e\u30ea\u30dd\u30b8\u30c8\u30ea<\/a>\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n\n\n\n\n\n\n\n Python \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u958b\u767a\u3059\u308b\u969b\u306f\uff0c\u8907\u6570\u306e Python \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30c6\u30b9\u30c8\u3092\u884c\u3046\u3053\u3068\u304c\u4e00\u822c\u7684\u3067\uff0ctox<\/a> \u306a\u3069\u306e\u8907\u6570\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u30c6\u30b9\u30c8\u3092\u5bb9\u6613\u306b\u3059\u308b\u30c4\u30fc\u30eb\u304c\u5145\u5b9f\u3057\u3066\u3044\u307e\u3059\uff0e\u73fe\u6642\u70b9\u3067\u516c\u5f0f\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b CPython \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3060\u3051\u3067\u3082\uff0c2.7\u30fb3.5\u30fb3.6\u30fb3.7\u30fb3.8 \u30685\u3064\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n\n\n\n \u307e\u305f\uff0cPython C\/API \u3084 Cython \u306a\u3069\u3092\u4f7f\u3063\u305f C\u8a00\u8a9e\u62e1\u5f35 (\u30d0\u30a4\u30ca\u30ea) \u3092\u542b\u3080\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u958b\u767a\u3059\u308b\u5834\u5408\uff0c\u8907\u6570\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u306e\u30c6\u30b9\u30c8\u3084\u30d1\u30c3\u30b1\u30fc\u30b8\u30f3\u30b0\u3092\u884c\u3046\u5fc5\u8981\u3082\u3042\u308a\u307e\u3059\uff0e\u5b9f\u969b\u306b\u81ea\u5206\u81ea\u8eab\u3067\u5168\u3066\u306e\u74b0\u5883\u3092\u6574\u3048\u308b\u306e\u306f\u304b\u306a\u308a\u9762\u5012\u306a\u4f5c\u696d\u3067\u3059\uff0e<\/p>\n\n\n\n GitHub Actions \u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7279\u5fb4\u304c\u3042\u308a\uff0c\u8907\u6570\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30fb\u8907\u6570\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7528\u3044\u305f Python \u306e CI \u3092\u5b9f\u884c\u3059\u308b\u306e\u306b\u9069\u3057\u305f\u74b0\u5883\u304c\u6574\u3063\u3066\u3044\u307e\u3059:<\/p>\n\n\n\n GitHub Actions \u3092\u5229\u7528\u3059\u308b\u30c7\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u306f\uff0c\u73fe\u6642\u70b9\u3067\u306f\u307e\u3060\u5229\u7528\u8005\u304c\u6bd4\u8f03\u7684\u5c11\u306a\u304f\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u304c\u78ba\u7acb\u3057\u3066\u3044\u306a\u3044\u70b9\u3084\uff0cPython 3.8 \u306e\u30ea\u30ea\u30fc\u30b9\u304b\u3089 GitHub Actions \u3067\u306e\u5bfe\u5fdc\u307e\u3067\u306e\u6642\u9593\u304c\u304b\u304b\u308b\u3068\u3044\u3063\u305f\u516c\u5f0f\u306e\u30b5\u30dd\u30fc\u30c8\u306b\u82e5\u5e72\u306e\u4e0d\u5b89\u3092\u899a\u3048\u308b\u70b9\u304c\u6319\u3052\u3089\u308c\u307e\u3059\uff0e<\/p>\n\n\n\n \u307e\u305a\u306f\uff0cGitHub Actions \u3092\u4f7f\u3063\u3066\u8907\u6570\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30fbPython \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n \u8907\u6570\u306e Python \u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306e\u30c6\u30b9\u30c8\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306b\uff0c\u30c6\u30b9\u30c8\u30c4\u30fc\u30eb\u306b tox \u3092\u5c0e\u5165\u3057\u307e\u3059\uff0eCI \u30c4\u30fc\u30eb\u306e\u6a5f\u80fd\u3092\u4f7f\u3063\u3066\u8907\u6570\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u5b9f\u73fe\u3057\u3066\u3082\u826f\u3044\u306e\u3067\u3059\u304c\uff0c\u3053\u306e\u5834\u5408\u306f\u4ed6\u306e CI \u30c4\u30fc\u30eb\u3078\u306e\u79fb\u884c\u304c\u9762\u5012\u306b\u306a\u3063\u305f\u308a\uff0c\u30ed\u30fc\u30ab\u30eb\u3067\u30c6\u30b9\u30c8\u3059\u308b\u969b\u306e\u65b9\u6cd5\u3092\u5225\u306b\u7528\u610f\u3059\u308b\u5fc5\u8981\u751f\u3058\u305f\u308a\u3059\u308b\u305f\u3081\uff0ctox \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n Python 2.7\uff0c3.5\u301c3.8 \u4e0a\u3067 pytest \u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a ( \u6b21\u306b GitHub Actions \u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff0e\u4ee5\u4e0b\u306e\u8a2d\u5b9a ( C\u8a00\u8a9e\u62e1\u5f35\u3092\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u5834\u5408 (\u4f9d\u5b58\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u5229\u7528\u3059\u308b\u62e1\u5f35\u3092\u30d3\u30eb\u30c9\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u5834\u5408\u3084\uff0cPython\/C API\u30fbCython \u3092\u4f7f\u3063\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u958b\u767a\u3057\u3066\u3044\u308b\u5834\u5408\u306a\u3069)\uff0c\u4e0a\u8a18\u306e\u8a2d\u5b9a\u3060\u3051\u3067\u306f\u30d3\u30eb\u30c9\u304c\u5931\u6557\u3059\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\uff0e\u3053\u306e\u5834\u5408\u5404\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u8ffd\u52a0\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u5c0e\u5165\u3084\u8a2d\u5b9a\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e\u5168\u3066\u306e\u4f8b\u3092\u7db2\u7f85\u7684\u306b\u8aac\u660e\u3059\u308b\u3053\u3068\u306f\u96e3\u3057\u3044\u306e\u3067\uff0c\u3053\u3053\u3067\u306f\u3044\u304f\u3064\u304b\u306e\u4f8b\u3092\u7d39\u4ecb\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n Python 2.7 \u3067 Windows \u5411\u3051\u306e\u30d0\u30a4\u30ca\u30ea\u3092\u30d3\u30eb\u30c9\u3059\u308b\u5834\u5408\uff0c\u6bd4\u8f03\u7684\u53e4\u3044\u30d0\u30fc\u30b8\u30e7\u30f3\u306e Microsoft Visual C++ Compiler \u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\uff0e(\u516c\u5f0f\u304c\u914d\u5e03\u3057\u3066\u3044\u308b CPython \u306e\u30d3\u30eb\u30c9\u306b\u4f7f\u308f\u308c\u3066\u3044\u308b\u30b3\u30f3\u30d1\u30a4\u30e9\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u60c5\u5831\u306f\u3053\u3061\u3089<\/a>\uff0e) Microsoft \u304c\u5fc5\u8981\u306a\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u914d\u4fe1\u3057\u3066\u304f\u308c\u3066\u3044\u308b<\/a>\u306e\u3067\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u3066 GitHub Actions \u306e\u30b8\u30e7\u30d6\u3067\u30b3\u30f3\u30d1\u30a4\u30e9\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n Windows \u74b0\u5883\u3067\u4e0a\u8a18\u306e\u3088\u3046\u306a\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u305f\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b Python \u306e wheel \u3068\u306f\u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u306e\u4e00\u7a2e\u3067\uff0c\u30b3\u30f3\u30d1\u30a4\u30eb\u6e08\u307f\u306e\u30d0\u30a4\u30ca\u30ea (C\u8a00\u8a9e\u62e1\u5f35) \u3092\u542b\u3081\u3089\u308c\u308b\u3053\u3068\u304c\u7279\u5fb4\u3067\u3059\uff0e\u3053\u308c\u306b\u3088\u308a\uff0c\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3059\u308b\u30e6\u30fc\u30b6\u30fc\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u6642\u306b\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u306a\u304f\u7c21\u5358\u306b\u5229\u7528\u3067\u304d\u307e\u3059\uff0e\u8457\u540d\u306a\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u306f numpy<\/a> \u304c\u5404\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u5411\u3051\u306e wheel \u3092\u914d\u5e03\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n\n\n\n \u3057\u304b\u3057\uff0cwheel \u306f\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0 (OS) \u3068 Python \u306e\u7d44\u307f\u5408\u308f\u305b\u3054\u3068\u306b\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\uff0c\u500b\u4eba\u30ec\u30d9\u30eb\u3067\u591a\u304f\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u305f\u3081\u306e wheel \u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u306f\u9762\u5012\u3067\u3057\u305f\uff0eGitHub Actions \u3092\u7528\u3044\u308b\u3068\u8ab0\u3067\u3082\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u591a\u304f\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u305f\u3081\u306e wheel \u3092\u7528\u610f\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n\n\n\n wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u305f\u3081\u306e\u8a2d\u5b9a\u306f\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\uff0c\u3053\u306e\u7bc0\u3067\u306f\u8981\u70b9\u306b\u7d5e\u3063\u3066\u7d39\u4ecb\u3057\u307e\u3059\uff0e\u5b8c\u5168\u306a\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u3053\u3061\u3089<\/a>\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n\n\n\n Linux \u306f\u30c7\u30a3\u30b9\u30c8\u30ea\u30d3\u30e5\u30fc\u30b7\u30e7\u30f3\u306b\u3088\u3063\u3066\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u7d44\u307f\u5408\u308f\u305b\u7b49\u304c\u7570\u306a\u308b\u305f\u3081\uff0cwheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u306f\u5f93\u6765\u56f0\u96e3\u3067\u3057\u305f\uff0e\u6700\u8fd1\u3067\u306f manylinux1<\/a>\/manylinux2010<\/a> \u3068\u3044\u3063\u305f\u4eee\u60f3\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u306e\u5236\u9650\u3092\u6e80\u305f\u3059 wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u3053\u3068\u3067\uff0cLinux \u3067\u3082 wheel \u306e\u6069\u6075\u3092\u4eab\u53d7\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\uff0e<\/p>\n\n\n\n manylinux1\/manylinux2010 \u306e wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u5834\u5408\u306f\uff0c\u307e\u305a GitHub Actions \u4e0a\u3067 Linux \u306e\u30b8\u30e7\u30d6\u3092\u5b9f\u884c\u3057\uff0c\u305d\u306e\u4e0a\u3067 manylinux1\/manylinux2010 \u306e Docker \u30a4\u30e1\u30fc\u30b8<\/a>\u3092\u4f7f\u3063\u3066 wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u306e\u304c\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n\n\n\n macOS \u306e\u305f\u3081\u306e wheel \u306f GitHub Actions \u306e\u30b8\u30e7\u30d6\u4e0a\u3067 Windows \u306e\u305f\u3081\u306e wheel \u306e\u30d3\u30eb\u30c9\u3082\uff0c\u30c6\u30b9\u30c8\u304c\u3067\u304d\u308b\u74b0\u5883\u307e\u3067\u6574\u3063\u3066\u3044\u308c\u3070\u6bd4\u8f03\u7684\u7c21\u5358\u3067\u3059\uff0e\u30b8\u30e7\u30d6\u4e2d\u3067 \u516c\u5f0f\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3067\u306f\u8aac\u660e\u3055\u308c\u3066\u3044\u306a\u3044\u3088\u3046\u3067\u3059\u304c\uff0c\u4e00\u3064\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u4e2d\u3067\u540c\u3058\u540d\u524d\u3092\u4f7f\u3063\u3066 \u3053\u306e\u8a18\u4e8b\u3067\u306f GitHub Actions \u3092\u4f7f\u3063\u3066\uff0cPython \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u30de\u30eb\u30c1\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u30c6\u30b9\u30c8\u3059\u308b\u65b9\u6cd5\u3084\uff0cC\u8a00\u8a9e\u62e1\u5f35\u3092\u30d3\u30eb\u30c9\u3059\u308b\u969b\u306e\u6ce8\u610f\u70b9\uff0c\u30d0\u30a4\u30ca\u30ea\u3092 wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u65b9\u6cd5\u306a\u3069\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3057\u305f\uff0e<\/p>\n\n\n\n \u4eca\u56de\u7d39\u4ecb\u3057\u305f\u5185\u5bb9\u3092\u5168\u3066\u5b9f\u88c5\u3057\u305f\u5834\u5408\uff0c\u8a2d\u5b9a\u306f\u305d\u308c\u306a\u308a\u306b\u8907\u96d1\u306a\u3082\u306e\u306b\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u304c\uff0cGitHub Actions \u3068\u3044\u3046\u4e00\u3064\u306e\u30c4\u30fc\u30eb\u3060\u3051\u3067\u3053\u308c\u3089\u304c\u5b9f\u73fe\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3053\u3068\u306f\u5927\u304d\u306a\u9032\u6b69\u3060\u3068\u601d\u3044\u307e\u3059\uff0e\u73fe\u6642\u70b9\u3067\u4ed6\u306e CI \u30c4\u30fc\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u3082\uff0cGitHub Actions \u3092\u4f75\u7528\u3057\u3066\u8a66\u3057\u3066\u307f\u3066\u3082\u826f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n\n\n\nGitHub Actions \u306e\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8<\/h2>\n\n\n\n
\u8907\u6570\u306e\u74b0\u5883\u3067\u306e\u30c6\u30b9\u30c8\u306e\u5b9f\u884c<\/h2>\n\n\n\n
tox \u306e\u8a2d\u5b9a<\/h3>\n\n\n\n
tox.ini<\/code>) \u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059: <\/p>\n\n\n\n
[tox]\nenvlist = py27,py35,py36,py37,py38\n\n[gh-actions]\npython =\n 2.7: py27\n 3.5: py35\n 3.6: py36\n 3.7: py37\n 3.8: py38\n\n[testenv]\ndeps = pytest\ncommands =\n pytest<\/code><\/pre>\n\n\n\n
tox-gh-actions<\/h3>\n\n\n\n
[gh-actions]<\/code> \u306e\u30bb\u30af\u30b7\u30e7\u30f3\u306f tox-gh-actions<\/a> \u306e\u305f\u3081\u306e\u8a2d\u5b9a\u3067\u3059\uff0etox-gh-actions \u3092\u5c0e\u5165\u3059\u308b\u3068\uff0cGitHub Actions \u306e\u30b8\u30e7\u30d6\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b Python \u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u306e\u307f\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0eTravis CI \u306e\u305f\u3081\u306e tox-travis \u306e GitHub Actions \u7248\u3060\u3068\u601d\u3063\u3066\u3082\u3089\u3063\u3066\u69cb\u3044\u307e\u305b\u3093\uff0e<\/p>\n\n\n\n
GitHub Actions \u306e\u8a2d\u5b9a<\/h3>\n\n\n\n
.github\/workflows\/tests.yml<\/code>) \u306f GitHub \u306b\u30b3\u30fc\u30c9\u304c push \u3055\u308c\u305f\u969b\u306b tox \u3092\u4f7f\u3063\u3066\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u307e\u3059\uff0e<\/p>\n\n\n\n
name: Tests\n\non: [push]\n\njobs:\n build:\n runs-on: ${{ matrix.platform }}\n strategy:\n max-parallel: 15\n matrix:\n platform: [ubuntu-latest, macos-latest, windows-latest]\n python-version: [2.7, 3.5, 3.6, 3.7, 3.8]\n\n steps:\n - uses: actions\/checkout@v1\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions\/setup-python@v1\n with:\n python-version: ${{ matrix.python-version }}\n - name: Install dependencies\n run: |\n python -m pip install --upgrade pip setuptools wheel\n python -m pip install tox tox-gh-actions\n - name: Test with tox\n run: tox<\/code><\/pre>\n\n\n\n
jobs.build.strategy.matrix<\/code> \u3092\u5229\u7528\u3059\u308b\u3053\u3068\u30673\u3064\u306eOS\u30685\u3064\u306ePython\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u7d44\u307f\u5408\u308f\u305b\u305f15\u901a\u308a\u306e\u30b8\u30e7\u30d6\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\uff0e\u305d\u308c\u305e\u308c\u306e\u30b8\u30e7\u30d6\u306e\u4e2d\u3067\u6700\u65b0\u306e pip\u30fbsetuptools\u30fbwheel \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u3061\uff0ctox\u30fbtox-gh-actions \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\uff0c\u30c6\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n\n\n\n
C\u8a00\u8a9e\u62e1\u5f35\u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u4f7f\u7528<\/h2>\n\n\n\n
Python 2.7 + Windows<\/h3>\n\n\n\n
jobs:\n build:\n runs-on: ${{ matrix.platform }}\n strategy:\n max-parallel: 6\n matrix:\n platform: [ubuntu-latest, macos-latest, windows-2019]\n python-version: [2.7, 3.5, 3.6, 3.7, 3.8]\n\n steps:\n - uses: actions\/checkout@v1\n - name: Set up Python ${{ matrix.python-version }}\n uses: actions\/setup-python@v1\n with:\n python-version: ${{ matrix.python-version }}\n # Install Microsoft Visual C++ Compiler for Python 2.7\n # http:\/\/aka.ms\/vcpython27\n - name: Install MSVC++ for Python 2.7\n if: startsWith(matrix.platform, 'windows-') && matrix.python-version == 2.7\n run: choco install vcpython27 -y\n\n (\u4ee5\u4e0b\u7701\u7565)<\/code><\/pre>\n\n\n\n
Cannot open include file: ‘io.h’: No such file or directory<\/h3>\n\n\n\n
INCLUDE<\/code> \u306b\u30d1\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3067\u89e3\u6c7a\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3057\u305f\uff0e<\/p>\n\n\n\n
- name: Test with tox\n run: tox\n env:\n # This is for fixing the error like this:\n # pyconfig.h(68): fatal error C1083: Cannot open include file: 'io.h': No such file or directory\n INCLUDE: c:\/Program Files (x86)\/Microsoft Visual Studio\/2019\/Enterprise\/SDK\/ScopeCppSDK\/SDK\/include\/ucrt<\/code><\/pre>\n\n\n\n
\u30d0\u30a4\u30ca\u30ea\u3092\u542b\u3080 wheel \u306e\u30d3\u30eb\u30c9<\/h2>\n\n\n\n
Linux<\/h3>\n\n\n\n
macOS<\/h3>\n\n\n\n
python setup.py bdist_wheel<\/code> \u3092\u5b9f\u884c\u3057\u3066\u76f4\u63a5\u30d3\u30eb\u30c9\u3067\u304d\u307e\u3059\uff0e\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f
macosx_10_13_x86_64<\/code> \u306e\u3088\u3046\u306a\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30bf\u30b0\u304c\u3064\u304f\u305f\u3081\uff0cmacOS 10.13 High Sierra \u4ee5\u964d\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u308b wheel \u306b\u306a\u308a\u307e\u3059\uff0e\u3088\u308a\u53e4\u3044 macOS \u3067\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u306b\u306f delocate<\/a> \u306e\u3088\u3046\u306a\u30c4\u30fc\u30eb\u3092\u4f7f\u3063\u3066\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u30bf\u30b0\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n\n\n\n
Windows<\/h3>\n\n\n\n
python setup.py bdist_wheel<\/code> \u3092\u5b9f\u884c\u3059\u308c\u3070 wheel \u3092\u4f5c\u6210\u51fa\u6765\u307e\u3059\uff0e32bit (x86) \u3068 64bit (x64) \u306e\u4e21\u65b9\u306b\u5bfe\u5fdc\u3059\u308b\u305f\u3081\u306b\u306f\u305d\u308c\u305e\u308c wheel \u3092\u30d3\u30eb\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0eGitHub Actions \u3067 Python \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u969b\u306b\u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u304c\u6307\u5b9a\u3067\u304d\u308b\u305f\u3081\uff0c\u305d\u308c\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n\n\n\n
jobs:\n build_wheel_windows:\n runs-on: windows-2019\n strategy:\n max-parallel: 4\n matrix:\n python-version: [2.7, 3.6, 3.7, 3.8]\n architecture: ['x86', 'x64']\n steps:\n - uses: actions\/checkout@v1\n - name: Set up Python ${{ matrix.python-version }} (${{ matrix.architecture }})\n uses: actions\/setup-python@v1\n with:\n python-version: ${{ matrix.python-version }}\n architecture: ${{ matrix.architecture }}<\/code><\/pre>\n\n\n\n
wheel \u3092\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u3068\u3057\u3066\u307e\u3068\u3081\u308b<\/h3>\n\n\n\n
actions\/upload-artifact<\/code> \u3092\u8907\u6570\u56de\u5b9f\u884c\u3067\u304d\uff0c\u6700\u7d42\u7684\u306b\u751f\u6210\u3055\u308c\u308b\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306b\u306f\u5168\u3066\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5185\u5bb9\u304c\u542b\u307e\u308c\u308b\u3088\u3046\u3067\u3059\uff0ewheel \u306e\u30d3\u30eb\u30c9\u306e\u5834\u5408\uff0c\u305d\u308c\u305e\u308c\u306e\u30b8\u30e7\u30d6\u3067\u751f\u6210\u3055\u308c\u308b wheel \u30d5\u30a1\u30a4\u30eb\u306e\u540d\u524d\u306f\u76f8\u7570\u306a\u308b\u306e\u3067\u3053\u306e\u65b9\u6cd5\u3067\u7c21\u5358\u306b\u4e00\u3064\u306e\u30a2\u30fc\u30c6\u30a3\u30d5\u30a1\u30af\u30c8\u306b\u5168\u3066\u306e wheel \u3092\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\uff0e<\/p>\n\n\n\n
\u307e\u3068\u3081<\/h2>\n\n\n\n