DEV Community

Yuta Goto
Yuta Goto

Posted on

3 3

emojicodeをCircleCIで動かす

この記事は、雑談Slack Advent Calendar 2020 の2日目の記事です。

https://adventar.org/calendars/5337

EmojicodeをCircleCIで動かしてみました。

https://www.emojicode.org/


Alt Text

version: 2.1

executors:
  cpp:
    docker:
      - image: gcc:latest

jobs:
  run_emojicode:
    executor: cpp
    steps:
      - checkout
      - run:
          name: install some module
          command: |
            apt update && \
            apt install -y rsync libncurses5
      - run:
          name: install emojicode
          command: |
            wget https://github.com/emojicode/emojicode/releases/download/v1.0-beta.2/Emojicode-1.0-beta.2-Linux-x86_64.tar.gz -O emojicode.tar.gz \
            && tar -xzf emojicode.tar.gz && rm emojicode.tar.gz \
            && cd Emojicode-1.0-beta.2-Linux-x86_64 && yes | ./install.sh || true \
            && cd ..
      - run:
          name: build emojicode
          command: emojicodec hello.emojic
      - run:
          name: run
          command: ./hello

workflows:
  version: 2
  build:
    jobs: 
      - run_emojicode
Enter fullscreen mode Exit fullscreen mode

DockerHubにEmojicodeのDockerImageはないのでGCCからいろいろいじってインストールしていきます。
インストールしていくうえでコマンドも足りない部分もあるので、それもあらかじめインストールします。
インストールまでできたら、あとはビルドして実行するだけです。
emojicodeのコードの内容に関しては特に解説しません。fizzbuzzのコードに関して過去の記事がありますので、そちらを参照してください。

所感

毎度毎度同じインストールコマンドを書くのは面倒なのでOrbにしてみたいところ。。

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more