Tuesday 17 November 2020

Rust / InetliJ / Gitlab

というお題でした。Rust ほとんど触らないので、まったく忘れてる。

  Reuslt を文末の ? で投げられる

というのを見つけました。assertOK ってないの?

InteliJ は Java には良いんだが、Rust はまだまだな感じ。VSCode で良いじゃん説もある。

で、(本当はhgを使いたいが) git 経由で gitlab に投げて CI するという仕組み。

gitlab 側に設定がないなと思ったら、自分でProject の下に .gitlab-ci.yml を書くだけか。

簡単でいいね。Jenkins いいけど、gitlab と二重よりは良いかな。

エラーでぼろぼろなまま、授業は終わりましたが、あとは学生が自分でやってくれるだろう。

  # Setup a cache to cache job parts between jobs to ensure faster builds
  cache:
    key: "$CI_JOB_NAME"
    untracked: true
    paths:
    - $HOME/.cargo/
    - target/

  # Define a yaml template for running a build and then running your tests
  .cargo_test_template: &cargo_test
   script:
   - rustc --version && cargo --version
   - cargo build
   - cargo test --verbose

  test:stable:
   image: "rustdocker/rust:stable"
   <<: *cargo_test

No comments: