LoginSignup
2
0

More than 3 years have passed since last update.

メガドライブソフトをCircleCIでビルドする

Posted at

きっかけ

macOSをCatalinaにアップグレードしたら、WineでのSGDKプロジェクトビルドができなくなったので…。仲間内でビルド環境を共有したいし、ちょうどよいかなと。

前提

GitHubアカウントがあればよい。リポジトリは作っておく。CircleCIはGitHubアカウントでログイン可能なので、リポジトリを連携する。

ビルド設定

SGDKのお作法に則ってsrcディレクトリに*.c*.hファイルなど(bootディレクトリもお忘れなく…)、resディレクトリに*.resやリソースファイルを置いておく。

.circleci/config.yml
version: 2
jobs:
  build:
    docker:
      - image: ubuntu:bionic
    steps:
      - run: |
          apt-get update
          apt-get install -y curl texinfo openjdk-8-jre make
      - run: |
          curl -L -o gendev.deb https://github.com/kubilus1/gendev/releases/download/0.4.1/gendev_0.4.1_all.deb
          dpkg -i gendev.deb
          rm gendev.deb
      - checkout
      - run: |
          export GENDEV=/opt/gendev
          make -f $GENDEV/sgdk/mkfiles/makefile.gen clean all
      - store_artifacts:
          path: ./res
      - store_artifacts:
          path: ./out

リソースのヘッダファイルを確認したかったので、store_artifacts./resを含めている。

ハマりポイント

  • GENDEV公式にはopenjdk-8-jdkが必要とあったが、debパッケージインストール時はopenjdk-8-jreが求められた
  • checkoutは空ディレクトリを期待しているので、rm gendev.debをしないとエラーになる

参考文献

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0