トップ «前の日記(2018-01-10) 最新 次の日記(2018-01-12)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|

2018-01-11 :-)

_ [Travis CI]はじめての Travis CI

「いまどきwwww Travis CI www 草www」という感じで 5 周遅れくらいですが使ってみました。はじめてなので /// みんな大好き世界よこんにちは。

レガシーおじさんなので C 言語で。travis のテストは 0 で pass、非0 で fail らしいのでひとまず 0 決め打ち。

#include <stdio.h>

int main(int ac, char** av)
{
	printf("hello travis!!\n");
	return 0;
}

.travis.yml も超絶簡単に。

language: c 
compiler:
  - gcc
script:
    gcc main.c -o main && ./main

ソースファイルに限らず何らかのファイルをリポジトリに push すると travis がトリガーされて、ビルドとテストが実行されます。(ログを眺めてると毎回 仮想環境を構築しているようでそのぶんの時間がかかります)

travis のリポジトリページでバッジへのリンクが取得できるので、github の README.md 等にリンクを書いておくとテスト結果が表示されます。わーい たーのしー

https://github.com/miwarin/travisci-sample

_ [curl]curl で github の release ファイルを取得する方法

curl -O -L https://github.com/mackerelio/mackerel-agent-plugins/releases/download/v0.42.0/mackerel-agent-plugins_0.42.0-1_all.deb

マニュアル嫁っていう数年前に投げたブーメランが戻ってきた。

       -L, --location
              (HTTP) If the server reports that the requested page has moved to a different location  (indicated  with  a  Location:
              header  and  a 3XX response code), this option will make curl redo the request on the new place. If used together with
              -i, --include or -I, --head, headers from all requested pages will be shown. When authentication is  used,  curl  only
              sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be able to intercept
              the user+password. See also --location-trusted on how to change this. You can limit the amount of redirects to  follow
              by using the --max-redirs option.