Ebiten: Test installation for various Linux distributions

Created on 29 Apr 2020  路  16Comments  路  Source: hajimehoshi/ebiten

We've not tested installation guide for Linux very well, and we have found some issues (e.g., https://github.com/hajimehoshi/ebiten/issues/1146).

To solve this, we can have Docker files for various distributions, and test them regularly.

documentation help-wanted linux

All 16 comments

So the action items are make Docker files for various Linux distribution that installs Ebiten and run go-test, and add the Docker files to Ebiten repository (/docker directory, maybe?)

Contributions are welcome!

Let me look into it for a whle an see if I can help. I am a Linux user after all. :)

Thanks!

I have some experience with Dockerfiles, I can help too.

Here are the dependencies needed for Alpine Linux:

apk add go alsa-lib-dev libx11-dev libxrandr-dev libxcursor-dev libxinerama-dev libxi-dev mesa-dev

I used sourcehut builds to test building Ebiten on Alpine Linux. It also supports Arch, Fedora, and Ubuntu, among others. It can also integrate with your Github repositories. If you like I can work on adding build manifests to the repo.

Cool! Would it be possible to make the Dockerfile work on GitHub actions?

I managed to get Ebiten to pass all tests on Alpine Linux on sourcehut builds!

Here is the build manifest:

image: alpine/latest
packages:
  - alsa-lib-dev
  - libx11-dev
  - libxrandr-dev
  - libxcursor-dev
  - libxinerama-dev
  - libxi-dev
  - mesa-dev
  - mesa-dri-intel
  - go
  - xvfb-run
sources:
  - https://github.com/hajimehoshi/ebiten
tasks:
  - test: |
      cd ebiten
      xvfb-run go test -v

I will open a pull request.

Ah, I expected runnable dockerfiles on various distros rather than tests on GitHub actions... Testing on GitHub actions is another issue though #939

I expected runnable dockerfiles on various distros rather than tests on GitHub actions

Note that this is using sourcehut builds.

The issue's intention is a kind of documentation for installing Ebiten on various distroes.

Note that this is using sourcehut builds.

Acknowledged.

If we can test that Ebiten compiles and works on various distros, perhaps we might not need to use Docker? We can then update the documentation with the correct dependencies for each distro.

If we test every distro after each commit we can be sure that installation on that distro should work.

Dockerfiles should be useful as 'executable' documentation. https://ebiten.org/documents/install.html?os=linux has a list but I'm not confident they actually works... If we have Dockerfiles, we can update and make sure the dependencies easily.

If we test every distro after each commit we can be sure that installation on that distro should work.

Yes, testing would be a bonus task, but actual thorough tests are a little complicated (e.g. we need to test Wasm ver. and GopherJS ver. on Linux). So let's think about tests later.

In that case, we can just have the build manifest check that building Ebiten works without error. If an error occurs, that means a dependency must have changed, and we would then update the dependency in both the build manifest and the documentation.

So far Ebiten compiles on the following distros:

  • [x] Alpine Linux
  • [x] Arch Linux
  • [x] Debian
  • [x] Ubuntu
  • [x] Fedora (needed to install libXxf86vm-devel, should add that to the documentation)

the build manifest check

What is the build manifest check?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hajimehoshi picture hajimehoshi  路  4Comments

hajimehoshi picture hajimehoshi  路  6Comments

hajimehoshi picture hajimehoshi  路  3Comments

hajimehoshi picture hajimehoshi  路  7Comments

hajimehoshi picture hajimehoshi  路  6Comments