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にしてみたいところ。。

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay