Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Ubuntu - Build Examples | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Ubuntu - Build Examples | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download source | |
uses: actions/checkout@v2 | |
- name: Install Crystal | |
uses: oprypin/install-crystal@v1 | |
- name: Install Crystal libs | |
run: shards install | |
- name: Compile miniaudiohelpers.o | |
run: gcc -c -fPIC rsrc/miniaudio-tests/miniaudiohelpers.c -o rsrc/miniaudio-tests/miniaudiohelpers.o | |
- name: Compile libminiaudiohelpers.so | |
run: sudo gcc rsrc/miniaudio-tests/miniaudiohelpers.o -shared -o /usr/local/lib/libminiaudiohelpers.so -lm | |
- name: Install miniaudiohelpers 1 | |
run: sudo cp /usr/local/lib/libminiaudiohelpers.so /usr/lib/libminiaudiohelpers.so | |
- name: Install miniaudiohelpers 2 | |
run: sudo ln -s /usr/lib/libminiaudiohelpers.so /lib/miniaudiohelpers.so | |
- name: Install raylib | |
run: git clone https://github.com/raysan5/raylib | |
- name: mk build dir | |
run: mkdir raylib/build | |
- name: install raylib deps | |
run: sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev | |
- name: cmake 1 | |
run: cmake raylib -DBUILD_SHARED_LIBS=ON -B raylib/build | |
- name: cmake 2 | |
run: cmake --build raylib/build | |
- name: make install raylib | |
run: sudo make install -C raylib/build | |
- name: Install raylib 1 | |
run: sudo cp /usr/local/lib/libraylib.so.4.5.0 /usr/lib/libraylib.so.450 | |
- name: Install raylib 2 | |
run: sudo ln -s /usr/lib/libraylib.so.450 /lib/raylib.so | |
- name: Build examples | |
run: crystal run rsrc/build-examples/build.cr |