actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

Update/Add SDL2 #192

Closed mslinklater closed 4 years ago

mslinklater commented 4 years ago

Tool information

Area for Triage: See https://github.com/actions/virtual-environments/tree/master/triage-rules.yml for areas Question, Bug, or Feature?:

Virtual environments affected

Can this tool be installed during the build? I tried doing 'sudo apt-get install libsdl2-dev' but it fails with error 100

Are you willing to submit a PR?

thejoebourneidentity commented 4 years ago

Thanks for the suggestion, at this time the SDL2 library is not something we're going to add. Have you had any luck installing it as part of your build? If not, maybe we can help, please post over at the community forum https://github.community/t5/GitHub-Actions/bd-p/actions and maybe we can help get you going.

elpiel commented 1 year ago

For anyone landing here from a google search and still interested to install SDL2 you can follow this article CI workflow https://alexene.dev/2019/09/04/Github-actions-CI-rust-SDL2.html

Here's the solution for Ubuntu:

steps:
    - uses: actions/checkout@v1
    - name: install_dependencies
      run: |
        sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
        sudo apt-get update -y -qq
        sudo apt-get install libsdl2-dev
b5i commented 2 weeks ago

And here's for macOS:

steps:
    - uses: actions/checkout@v3
    - name: Install SDL2
      run: brew install SDL2

If you get an error telling you that <SDL2/SDL.h> is not found, make sure you test both /usr/local/include/SDL2 and /opt/homebrew/include/SDL2 because Homebrew changed their default installation path in Homebrew v3.0.0, now using /usr/local/ for Intel based Macs and /opt/homebrew Apple Silicons Macs.