61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
name: Linux
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 1
|
|
matrix:
|
|
bits: [32, 64]
|
|
include:
|
|
- bits: 32
|
|
ARCH: "x86"
|
|
- bits: 64
|
|
ARCH: "x64"
|
|
|
|
env:
|
|
RELEASE_NAME: raylib-3.1_linux_${{ matrix.ARCH }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- name: Update System
|
|
run: sudo apt-get update -qq
|
|
|
|
- name: Setup Environment
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
mkdir ${{ env.RELEASE_NAME }}
|
|
cd ${{ env.RELEASE_NAME }}
|
|
mkdir include
|
|
mkdir lib
|
|
cd ../../../raylib
|
|
sudo apt-get install gcc-multilib lib32gcc-7-dev
|
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
|
|
|
- name: Build Library
|
|
run: |
|
|
cd src
|
|
gcc -v
|
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_BUILD_ARCH=${{ matrix.ARCH }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
|
make clean
|
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_BUILD_ARCH=${{ matrix.ARCH }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
|
cd ..
|
|
|
|
- name: Generate Artifacts
|
|
run: |
|
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
|
cd build
|
|
tar -czvf ./${{ env.RELEASE_NAME }}.tar.gz ./${{ env.RELEASE_NAME }}
|
|
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|