diff --git a/.github/workflows/windows.yml b/.github/workflows/build.yml similarity index 55% rename from .github/workflows/windows.yml rename to .github/workflows/build.yml index 55a3b01..2162e63 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,4 @@ -# This is a basic workflow to help you get started with Actions - -name: Windows +name: Build # Controls when the workflow will run on: @@ -13,10 +11,56 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel + jobs: - # This workflow contains a single job called "build" - build: + 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 ] + 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 -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 + rm raylib/dynamic/*.so* raylib/dynamic/*.dll raylib/dynamic/*.dylib raylib/dynamic/32bit/* + 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: diff --git a/.github/workflows/linux-x64.yml b/.github/workflows/linux-x64.yml deleted file mode 100644 index 5d6d20a..0000000 --- a/.github/workflows/linux-x64.yml +++ /dev/null @@ -1,65 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Linux x64 - -# 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: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - 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 ] - 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 -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 - rm raylib/dynamic/*.so* raylib/dynamic/*.dll raylib/dynamic/*.dylib raylib/dynamic/32bit/* - 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/* - diff --git a/README.md b/README.md index dcb2daa..ebfc4a9 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,6 @@ New CFFI API static bindings. Faster, fewer bugs and easier to maintain than ct We distribute a statically linked binary Raylib library, install from Pypi. - pip3 install raylib==3.7.0.post1 - -If that doesn't work then try: - pip3 install raylib==3.7.0 Some platforms that should be available: @@ -56,8 +52,8 @@ Build and install Raylib from the raylib-c directory. mkdir build cd build cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release .. - msbuild ALL_BUILD.vxcproj - copy raylib\Debug\raylib.lib ..\.. + msbuild raylib.sln /target:raylib /property:Configuration=Release + copy raylib\Release\raylib.lib ..\.. cd ..\.. To update the dynamic libs, download the official release, e.g. https://github.com/raysan5/raylib/releases/download/3.7.0/raylib-3.7.0_win64_msvc16.zip and extract `raylib.dll`