217 lines
6.7 KiB
YAML
217 lines
6.7 KiB
YAML
name: Build
|
|
|
|
# Controls when the workflow will run
|
|
on:
|
|
# Triggers the workflow on push or pull request events but only for the master branch
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
|
|
jobs:
|
|
build-mac:
|
|
runs-on: macos-11
|
|
strategy:
|
|
matrix:
|
|
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2' ]
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: 10.14
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
python-version: ${{ matrix.python-version }}
|
|
# The target architecture (x86, x64) of the Python interpreter.
|
|
architecture: x64
|
|
|
|
# Runs a set of commands using the runners shell
|
|
- name: Build raylib
|
|
run: |
|
|
cd raylib-c
|
|
cd src
|
|
make -j2
|
|
sudo cp libraylib.a /usr/local/lib/libraylib.a
|
|
- name: Build raylib-python-cffi
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip3 install cffi
|
|
pip3 install wheel
|
|
python setup.py bdist_wheel
|
|
|
|
- name: Upload build Artifact wheel
|
|
uses: actions/upload-artifact@v2.2.4
|
|
with:
|
|
name: wheel
|
|
path: dist/*
|
|
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
# You can use PyPy versions in python-version.
|
|
# For example, pypy2 and pypy3
|
|
matrix:
|
|
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2', 'pypy-3.6', 'pypy-3.7' ]
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
python-version: ${{ matrix.python-version }}
|
|
# The target architecture (x86, x64) of the Python interpreter.
|
|
architecture: x64
|
|
|
|
# Runs a set of commands using the runners shell
|
|
- name: Build raylib
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev
|
|
cd raylib-c
|
|
mkdir build
|
|
cd build
|
|
cmake -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
|
make -j2
|
|
sudo make install
|
|
- name: Build raylib-python-cffi
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip3 install cffi
|
|
pip3 install wheel
|
|
python setup.py bdist_wheel --plat-name manylinux2014_x86_64
|
|
|
|
- name: Upload build Artifact wheel
|
|
uses: actions/upload-artifact@v2.2.4
|
|
with:
|
|
name: wheel
|
|
path: dist/*
|
|
|
|
|
|
build-windows:
|
|
# The type of runner that the job will run on
|
|
runs-on: windows-2019
|
|
strategy:
|
|
# You can use PyPy versions in python-version.
|
|
# For example, pypy2 and pypy3
|
|
matrix:
|
|
python-version: [ '3.6', '3.7', '3.8', '3.9', '3.10.0-rc.2' ]
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
python-version: ${{ matrix.python-version }}
|
|
# The target architecture (x86, x64) of the Python interpreter.
|
|
architecture: x64
|
|
|
|
- name: Add msbuild to PATH
|
|
uses: microsoft/setup-msbuild@v1.0.2
|
|
|
|
- name: Build raylib
|
|
run: |
|
|
cd raylib-c
|
|
mkdir build
|
|
cd build
|
|
cmake -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
|
|
msbuild raylib.sln /target:raylib /property:Configuration=Release
|
|
copy raylib\Release\raylib.lib ..\..
|
|
cd ..\..
|
|
shell: cmd
|
|
|
|
- name: Build raylib-python-cffi
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip3 install cffi
|
|
pip3 install wheel
|
|
del raylib\dynamic\*.so* >nul 2>&1
|
|
del raylib\dynamic\*.dll >nul 2>&1
|
|
del raylib\dynamic\*.dylib >nul 2>&1
|
|
del raylib\dynamic\32bit\* >nul 2>&1
|
|
python setup.py bdist_wheel
|
|
shell: cmd
|
|
|
|
- name: Upload build Artifact wheel
|
|
uses: actions/upload-artifact@v2.2.4
|
|
with:
|
|
name: wheel
|
|
path: dist/*
|
|
|
|
source-distro:
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
python-version: '3.9'
|
|
# The target architecture (x86, x64) of the Python interpreter.
|
|
architecture: x64
|
|
|
|
- name: Build raylib-python-cffi
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip3 install cffi
|
|
pip3 install wheel
|
|
python setup.py sdist
|
|
|
|
- name: Upload build Artifact wheel
|
|
uses: actions/upload-artifact@v2.2.4
|
|
with:
|
|
name: wheel
|
|
path: dist/*
|
|
|
|
dynamic-distro:
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2.2.2
|
|
with:
|
|
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
|
|
python-version: '3.9'
|
|
# The target architecture (x86, x64) of the Python interpreter.
|
|
architecture: x64
|
|
|
|
- name: Build raylib-python-cffi-dynamic
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip3 install cffi
|
|
pip3 install wheel
|
|
cd dynamic
|
|
python setup.py sdist
|
|
|
|
- name: Upload build Artifact wheel
|
|
uses: actions/upload-artifact@v2.2.4
|
|
with:
|
|
name: wheel
|
|
path: dynamic/dist/*
|