From f57e88238d64485f266fcdec2e6190266efd4be0 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 28 Jun 2021 12:15:05 +0100 Subject: [PATCH] CI --- ...{linux-x64-python-39.yml => linux-x64.yml} | 2 +- .github/workflows/windows.yml | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+), 1 deletion(-) rename .github/workflows/{linux-x64-python-39.yml => linux-x64.yml} (98%) create mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/linux-x64-python-39.yml b/.github/workflows/linux-x64.yml similarity index 98% rename from .github/workflows/linux-x64-python-39.yml rename to .github/workflows/linux-x64.yml index 7b3217b..5d6d20a 100644 --- a/.github/workflows/linux-x64-python-39.yml +++ b/.github/workflows/linux-x64.yml @@ -1,6 +1,6 @@ # This is a basic workflow to help you get started with Actions -name: Linux x64 Python 3.9 +name: Linux x64 # Controls when the workflow will run on: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 0000000..f99b8a4 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,66 @@ +# This is a basic workflow to help you get started with Actions + +name: Windows + +# 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: windows-2019 + strategy: + # You can use PyPy versions in python-version. + # For example, pypy2 and pypy3 + matrix: + python-version: [ 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: | + copy raylib-c\src\raylib.h raylib\raylib.h + cd raylib-c + mkdir build + cd build + cmake -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release .. + msbuild ALL_BUILD.vxcproj + copy raylib\Debug\raylib.lib ..\.. + cd ..\.. + + - name: Build raylib-python-cffi + run: | + python -m pip install --upgrade pip + pip3 install cffi + pip3 install wheel + del raylib\dynamic\*.so* raylib\dynamic\*.dll raylib\dynamic\*.dylib raylib\dynamic\32bit\* + python setup.py bdist_wheel + + - name: Upload build Artifact wheel + uses: actions/upload-artifact@v2.2.4 + with: + name: wheel + path: dist/* +