81 lines
2.4 KiB
YAML
81 lines
2.4 KiB
YAML
name: Linux
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 1
|
|
matrix:
|
|
bits: [32, 64]
|
|
include:
|
|
- bits: 32
|
|
ARCH: "i386"
|
|
ARCH_NAME: "i386"
|
|
COMPILER_PATH: "/user/bin"
|
|
- bits: 64
|
|
ARCH: "x86_64"
|
|
ARCH_NAME: "amd64"
|
|
COMPILER_PATH: "/user/bin"
|
|
|
|
env:
|
|
RELEASE_NAME: raylib-3.1_linux_${{ matrix.ARCH_NAME }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
|
|
- 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 -y --no-install-recommends mesa-utils libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
|
|
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
|
|
|
|
- name: Check Environment
|
|
run: |
|
|
ls
|
|
ls /usr
|
|
ls /usr/lib
|
|
|
|
- name: Build Library (i386 or amd64)
|
|
run: |
|
|
cd src
|
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-linux-gnu-gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-linux-gnu-gcc 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
|
|
|
|
- name: Upload Artifact to Release
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
|
asset_name: ${{ env.RELEASE_NAME }}.tar.gz
|
|
asset_content_type: application/gzip
|
|
if: github.event_name == 'release' && github.event.action == 'published'
|