|
1 |
| -# This is a basic workflow to help you get started with Actions |
2 |
| - |
3 |
| -name: Windows |
| 1 | +name: Build |
4 | 2 |
|
5 | 3 | # Controls when the workflow will run
|
6 | 4 | on:
|
|
13 | 11 | # Allows you to run this workflow manually from the Actions tab
|
14 | 12 | workflow_dispatch:
|
15 | 13 |
|
16 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 14 | + |
17 | 15 | jobs:
|
18 |
| - # This workflow contains a single job called "build" |
19 |
| - build: |
| 16 | + build-linux: |
| 17 | + runs-on: ubuntu-18.04 |
| 18 | + strategy: |
| 19 | + # You can use PyPy versions in python-version. |
| 20 | + # For example, pypy2 and pypy3 |
| 21 | + matrix: |
| 22 | + python-version: [ 3.6, 3.7, 3.8, 3.9 ] |
| 23 | + steps: |
| 24 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + with: |
| 27 | + submodules: recursive |
| 28 | + |
| 29 | + - name: Setup Python |
| 30 | + |
| 31 | + with: |
| 32 | + # Version range or exact version of a Python version to use, using SemVer's version range syntax. |
| 33 | + python-version: ${{ matrix.python-version }} |
| 34 | + # The target architecture (x86, x64) of the Python interpreter. |
| 35 | + architecture: x64 |
| 36 | + |
| 37 | + # Runs a set of commands using the runners shell |
| 38 | + - name: Build raylib |
| 39 | + run: | |
| 40 | + sudo apt update |
| 41 | + sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev |
| 42 | + cd raylib-c |
| 43 | + mkdir build |
| 44 | + cd build |
| 45 | + cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release .. |
| 46 | + make -j2 |
| 47 | + sudo make install |
| 48 | + - name: Build raylib-python-cffi |
| 49 | + run: | |
| 50 | + python -m pip install --upgrade pip |
| 51 | + pip3 install cffi |
| 52 | + pip3 install wheel |
| 53 | + rm raylib/dynamic/*.so* raylib/dynamic/*.dll raylib/dynamic/*.dylib raylib/dynamic/32bit/* |
| 54 | + python setup.py bdist_wheel --plat-name manylinux2014_x86_64 |
| 55 | +
|
| 56 | + - name: Upload build Artifact wheel |
| 57 | + |
| 58 | + with: |
| 59 | + name: wheel |
| 60 | + path: dist/* |
| 61 | + |
| 62 | + |
| 63 | + build-windows: |
20 | 64 | # The type of runner that the job will run on
|
21 | 65 | runs-on: windows-2019
|
22 | 66 | strategy:
|
|
0 commit comments