Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mancausoft committed Jan 11, 2025
1 parent 644a3a6 commit 90bdb13
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/build-rpi3-raylib-static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ jobs:
- name: Cache sysroot
id: cache-sysroot
uses: actions/cache@v4
uses: actions/cache/restore@v4
with:
save-always: true
path: ./sysroot
key: sysroot-buster

Expand All @@ -38,26 +37,21 @@ jobs:
sudo cp /usr/bin/qemu-arm-static ./sysroot/usr/bin/
sudo chroot ./sysroot /debootstrap/debootstrap --second-stage
sudo chroot ./sysroot apt update
sudo chroot ./sysroot apt install -y libgbm-dev libasound2-dev libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libdrm-dev
sudo chroot ./sysroot apt install -y libgbm-dev libasound2-dev libdrm-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev libdrm-dev libgles-dev
- name: Create CMake toolchain file
run: |
echo "set(CMAKE_SYSTEM_NAME Linux)" > toolchain.cmake
echo "set(CMAKE_SYSTEM_PROCESSOR arm)" >> toolchain.cmake
echo "set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)" >> toolchain.cmake
echo "set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)" >> toolchain.cmake
echo "set(CMAKE_SYSROOT $(pwd)/sysroot)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake
echo "set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)" >> toolchain.cmake
- name: Cache sysroot
id: cache-sysroot
uses: actions/cache/save@v4
with:
path: ./sysroot
key: sysroot-buster

- name: Build raylib (static) for Raspberry Pi
run: |
export SYSROOT=$(pwd)/sysroot
git clone --depth 1 https://github.com/raysan5/raylib.git
cd raylib/src
make PLATFORM=PLATFORM_DRM USE_RPI_CROSS_COMPILER=TRUE RPI_TOOLCHAIN=/usr RPI_TOOLCHAIN_NAME=arm-linux-gnueabihf INCLUDE_PATHS='-I . -I ../../sysroot/usr/include/libdrm'
make PLATFORM=PLATFORM_DRM USE_RPI_CROSS_COMPILER=TRUE RPI_TOOLCHAIN=/usr RPI_TOOLCHAIN_NAME=arm-linux-gnueabihf INCLUDE_PATHS='-I . -I ../../sysroot/usr/include -I ../../sysroot/usr/include/libdrm'
- name: Build the project
run: |
Expand Down

0 comments on commit 90bdb13

Please sign in to comment.