RENAMED: GitHub Actions files, clearer naming
This commit is contained in:
parent
8562841c63
commit
44207b293e
11 changed files with 0 additions and 0 deletions
135
.github/workflows/analize_codeql.yml
vendored
Normal file
135
.github/workflows/analize_codeql.yml
vendored
Normal file
|
|
@ -0,0 +1,135 @@
|
||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
name: Analyze raylib with CodeQL
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# push:
|
||||||
|
# branches: [ "main", "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: '*'
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 1'
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||||
|
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||||
|
# - https://gh.io/supported-runners-and-hardware-resources
|
||||||
|
# - https://gh.io/using-larger-runners
|
||||||
|
# Consider using larger runners for possible analysis time improvements.
|
||||||
|
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||||
|
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'cpp' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
|
||||||
|
# Use only 'java' to analyze code written in Java, Kotlin or both
|
||||||
|
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
|
||||||
|
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
# Note the current convention is to use the -S and -B options here to specify source
|
||||||
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||||
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||||
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v2
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
|
||||||
|
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||||
|
# queries: security-extended,security-and-quality
|
||||||
|
queries: security-and-quality
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
cmake --build . --config $BUILD_TYPE
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v2
|
||||||
|
with:
|
||||||
|
category: "/language:${{matrix.language}}"
|
||||||
|
upload: false
|
||||||
|
id: step1
|
||||||
|
|
||||||
|
# Filter out rules with low severity or high false positve rate
|
||||||
|
# Also filter out warnings in third-party code
|
||||||
|
- name: Filter out unwanted errors and warnings
|
||||||
|
uses: advanced-security/filter-sarif@v1
|
||||||
|
with:
|
||||||
|
patterns: |
|
||||||
|
-**:cpp/path-injection
|
||||||
|
-**:cpp/world-writable-file-creation
|
||||||
|
-**:cpp/poorly-documented-function
|
||||||
|
-**:cpp/potentially-dangerous-function
|
||||||
|
-**:cpp/use-of-goto
|
||||||
|
-**:cpp/integer-multiplication-cast-to-long
|
||||||
|
-**:cpp/comparison-with-wider-type
|
||||||
|
-**:cpp/leap-year/*
|
||||||
|
-**:cpp/ambiguously-signed-bit-field
|
||||||
|
-**:cpp/suspicious-pointer-scaling
|
||||||
|
-**:cpp/suspicious-pointer-scaling-void
|
||||||
|
-**:cpp/unsigned-comparison-zero
|
||||||
|
-**/cmake*/Modules/**
|
||||||
|
-**/src/external/glfw/**
|
||||||
|
-**/src/external/**
|
||||||
|
input: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||||
|
output: ${{ steps.step1.outputs.sarif-output }}/cpp.sarif
|
||||||
|
|
||||||
|
- name: Upload CodeQL results to code scanning
|
||||||
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
|
with:
|
||||||
|
sarif_file: ${{ steps.step1.outputs.sarif-output }}
|
||||||
|
category: "/language:${{matrix.language}}"
|
||||||
|
|
||||||
|
- name: Upload CodeQL results as an artifact
|
||||||
|
if: success() || failure()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: codeql-results
|
||||||
|
path: ${{ steps.step1.outputs.sarif-output }}
|
||||||
|
retention-days: 5
|
||||||
96
.github/workflows/build_android.yml
vendored
Normal file
96
.github/workflows/build_android.yml
vendored
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
name: Build raylib - Android
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/android.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/android.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
ARCH: ["arm64", "x86_64"]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_android_api29_${{ matrix.ARCH }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_android_api29_${{ matrix.ARCH }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Android NDK
|
||||||
|
id: setup-ndk
|
||||||
|
uses: nttld/setup-ndk@v1
|
||||||
|
with:
|
||||||
|
ndk-version: r25
|
||||||
|
add-to-path: false
|
||||||
|
env:
|
||||||
|
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Generating static + shared library for 64bit arquitectures and API version 29
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||||
|
make PLATFORM=PLATFORM_ANDROID ANDROID_ARCH=${{ matrix.ARCH }} ANDROID_API_VERSION=29 ANDROID_NDK=${{ env.ANDROID_NDK_HOME }} RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
111
.github/workflows/build_cmake.yml
vendored
Normal file
111
.github/workflows/build_cmake.yml
vendored
Normal file
|
|
@ -0,0 +1,111 @@
|
||||||
|
name: Build raylib CMake - Windows+Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/cmake.yml'
|
||||||
|
- 'CMakeList.txt'
|
||||||
|
- 'CMakeOptions.txt'
|
||||||
|
- 'cmake/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/cmake.yml'
|
||||||
|
- 'CMakeList.txt'
|
||||||
|
- 'CMakeOptions.txt'
|
||||||
|
- 'cmake/**'
|
||||||
|
|
||||||
|
env:
|
||||||
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
|
BUILD_TYPE: Release
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_windows:
|
||||||
|
name: Windows Build
|
||||||
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||||
|
# cross-platform coverage.
|
||||||
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: powershell
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
# Note the current convention is to use the -S and -B options here to specify source
|
||||||
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||||
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||||
|
run: cmake $env:GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$env:BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: powershell
|
||||||
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
|
run: cmake --build . --config $env:BUILD_TYPE
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: powershell
|
||||||
|
# Execute tests defined by the CMake configuration.
|
||||||
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
|
run: ctest -C $env:BUILD_TYPE
|
||||||
|
|
||||||
|
build_linux:
|
||||||
|
name: Linux Build
|
||||||
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
||||||
|
# cross-platform coverage.
|
||||||
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libwayland-bin libxkbcommon-dev
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
# Note the current convention is to use the -S and -B options here to specify source
|
||||||
|
# and build directories, but this is only available with CMake 3.13 and higher.
|
||||||
|
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
|
||||||
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPLATFORM=Desktop
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: bash
|
||||||
|
# Execute the build. You can specify a specific target with "--target <NAME>"
|
||||||
|
run: cmake --build . --config $BUILD_TYPE
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
shell: bash
|
||||||
|
# Execute tests defined by the CMake configuration.
|
||||||
|
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
|
||||||
|
run: ctest -C $BUILD_TYPE
|
||||||
42
.github/workflows/build_examples_linux.yml
vendored
Normal file
42
.github/workflows/build_examples_linux.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
name: Build raylib examples - Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux_examples.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux_examples.yml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
|
||||||
|
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Build Examples
|
||||||
|
run: |
|
||||||
|
cd examples
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP -B
|
||||||
|
cd ..
|
||||||
36
.github/workflows/build_examples_windows.yml
vendored
Normal file
36
.github/workflows/build_examples_windows.yml
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
name: Build raylib examples - Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows_examples.yml'
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows_examples.yml'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Add MSBuild to PATH
|
||||||
|
uses: microsoft/setup-msbuild@v1
|
||||||
|
|
||||||
|
- name: Build Library (MSVC16)
|
||||||
|
run: |
|
||||||
|
cd projects/VS2019
|
||||||
|
msbuild.exe raylib.sln /property:Configuration=Release /property:Platform=x86
|
||||||
|
cd ../..
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
126
.github/workflows/build_linux.yml
vendored
Normal file
126
.github/workflows/build_linux.yml
vendored
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
name: Build raylib - Linux
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/linux.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- bits: 32
|
||||||
|
ARCH: "i386"
|
||||||
|
ARCH_NAME: "i386"
|
||||||
|
COMPILER_PATH: "/usr/bin"
|
||||||
|
runner: "ubuntu-latest"
|
||||||
|
- bits: 64
|
||||||
|
ARCH: "x86_64"
|
||||||
|
ARCH_NAME: "amd64"
|
||||||
|
COMPILER_PATH: "/usr/bin"
|
||||||
|
runner: "ubuntu-latest"
|
||||||
|
- bits: 64
|
||||||
|
ARCH: "aarch64"
|
||||||
|
ARCH_NAME: "arm64"
|
||||||
|
COMPILER_PATH: "/usr/bin"
|
||||||
|
runner: "ubuntu-24.04-arm"
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.runner }}
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_linux_${{ matrix.ARCH_NAME }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_linux_${{ matrix.ARCH_NAME }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq
|
||||||
|
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev libwayland-dev libxkbcommon-dev
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../../../raylib
|
||||||
|
# ${{ matrix.ARCH }}-linux-gnu-gcc -v
|
||||||
|
|
||||||
|
- name: Setup Environment (x86)
|
||||||
|
run : |
|
||||||
|
sudo apt-get install gcc-multilib
|
||||||
|
if: matrix.bits == 32 && matrix.ARCH == 'i386'
|
||||||
|
|
||||||
|
# TODO: Support 32bit (i386) static/shared library building
|
||||||
|
- name: Build Library (32-bit)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS="-m32" -B
|
||||||
|
# make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
if: matrix.bits == 32
|
||||||
|
|
||||||
|
- name: Build Library (64-bit x86)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
if: matrix.bits == 64 && matrix.ARCH == 'x86_64'
|
||||||
|
|
||||||
|
- name: Build Library (64-bit ARM)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=gcc RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
if: matrix.bits == 64 && matrix.ARCH == 'aarch64'
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
113
.github/workflows/build_macos.yml
vendored
Normal file
113
.github/workflows/build_macos.yml
vendored
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
name: Build raylib - macOS
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/macos.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/macos.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: macos-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_macos
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_macos" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
# Generating static + shared library, note that i386 architecture is deprecated
|
||||||
|
# Defining GL_SILENCE_DEPRECATION because OpenGL is deprecated on macOS
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
clang --version
|
||||||
|
|
||||||
|
# Extract version numbers from Makefile
|
||||||
|
brew install grep
|
||||||
|
RAYLIB_API_VERSION=`ggrep -Po 'RAYLIB_API_VERSION\s*=\s\K(.*)' Makefile`
|
||||||
|
RAYLIB_VERSION=`ggrep -Po 'RAYLIB_VERSION\s*=\s\K(.*)' Makefile`
|
||||||
|
|
||||||
|
# Build raylib x86_64 static
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION"
|
||||||
|
mv libraylib.a /tmp/libraylib_x86_64.a
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Build raylib arm64 static
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=STATIC CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" -B
|
||||||
|
mv libraylib.a /tmp/libraylib_arm64.a
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Join x86_64 and arm64 static
|
||||||
|
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.a /tmp/libraylib_x86_64.a /tmp/libraylib_arm64.a
|
||||||
|
|
||||||
|
# Build raylib x86_64 dynamic
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target x86_64-apple-macos10.12 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target x86_64-apple-macos10.12" -B
|
||||||
|
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib
|
||||||
|
make clean
|
||||||
|
|
||||||
|
# Build raylib arm64 dynamic
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED CUSTOM_CFLAGS="-target arm64-apple-macos11 -DGL_SILENCE_DEPRECATION" CUSTOM_LDFLAGS="-target arm64-apple-macos11" -B
|
||||||
|
mv libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||||
|
|
||||||
|
# Join x86_64 and arm64 dynamic
|
||||||
|
lipo -create -output ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_VERSION}.dylib /tmp/libraylib_x86_64.${RAYLIB_VERSION}.dylib /tmp/libraylib_arm64.${RAYLIB_VERSION}.dylib
|
||||||
|
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.dylib
|
||||||
|
ln -sv libraylib.${RAYLIB_VERSION}.dylib ../build/${{ env.RELEASE_NAME }}/lib/libraylib.${RAYLIB_API_VERSION}.dylib
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
cp -v ./src/raylib.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/raymath.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./src/rlgl.h ./build/${{ env.RELEASE_NAME }}/include
|
||||||
|
cp -v ./CHANGELOG ./build/${{ env.RELEASE_NAME }}/CHANGELOG
|
||||||
|
cp -v ./README.md ./build/${{ env.RELEASE_NAME }}/README.md
|
||||||
|
cp -v ./LICENSE ./build/${{ env.RELEASE_NAME }}/LICENSE
|
||||||
|
cd build
|
||||||
|
tar -czvf ${{ env.RELEASE_NAME }}.tar.gz ${{ env.RELEASE_NAME }}
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: ./build/${{ env.RELEASE_NAME }}.tar.gz
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
83
.github/workflows/build_webassembly.yml
vendored
Normal file
83
.github/workflows/build_webassembly.yml
vendored
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
name: Build raylib - WebAssembly
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/webassembly.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/webassembly.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_webassembly
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
|
with:
|
||||||
|
version: 3.1.71
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_webassembly" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../..
|
||||||
|
|
||||||
|
- name: Build Library
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
emcc -v
|
||||||
|
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||||
|
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||||
|
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||||
|
copy /Y .\CHANGELOG .\build/${{ env.RELEASE_NAME }}\CHANGELOG
|
||||||
|
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||||
|
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||||
|
cd build
|
||||||
|
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||||
|
dir
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
154
.github/workflows/build_windows.yml
vendored
Normal file
154
.github/workflows/build_windows.yml
vendored
Normal file
|
|
@ -0,0 +1,154 @@
|
||||||
|
name: Build raylib - Windows
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows.yml'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'src/**'
|
||||||
|
- 'examples/**'
|
||||||
|
- '.github/workflows/windows.yml'
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
permissions:
|
||||||
|
contents: write # for actions/upload-release-asset to upload release asset
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 1
|
||||||
|
matrix:
|
||||||
|
compiler: [mingw-w64, msvc16]
|
||||||
|
ziptarget: [ win32, win64, winarm64 ]
|
||||||
|
include:
|
||||||
|
- compiler: mingw-w64
|
||||||
|
ARCH: "i686"
|
||||||
|
WINDRES_ARCH: pe-i386
|
||||||
|
ziptarget: "win32"
|
||||||
|
- compiler: mingw-w64
|
||||||
|
ARCH: "x86_64"
|
||||||
|
WINDRES_ARCH: pe-x86-64
|
||||||
|
ziptarget: "win64"
|
||||||
|
- compiler: msvc16
|
||||||
|
ARCH: "x86"
|
||||||
|
VSARCHPATH: "Win32"
|
||||||
|
ziptarget: "win32"
|
||||||
|
- compiler: msvc16
|
||||||
|
ARCH: "x64"
|
||||||
|
VSARCHPATH: "x64"
|
||||||
|
ziptarget: "win64"
|
||||||
|
- compiler: msvc16
|
||||||
|
ARCH: "ARM64"
|
||||||
|
VSARCHPATH: "ARM64"
|
||||||
|
ziptarget: "winarm64"
|
||||||
|
exclude:
|
||||||
|
- compiler: mingw-w64
|
||||||
|
ziptarget: winarm64 # We don't build arm64 with mingw-w64 yet
|
||||||
|
|
||||||
|
env:
|
||||||
|
RELEASE_NAME: raylib-dev_${{ matrix.ziptarget }}_${{ matrix.compiler }}
|
||||||
|
GNUTARGET: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup Release Version
|
||||||
|
run: |
|
||||||
|
echo "RELEASE_NAME=raylib-${{ github.event.release.tag_name }}_${{ matrix.ziptarget }}_${{ matrix.compiler }}" >> $GITHUB_ENV
|
||||||
|
shell: bash
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
|
|
||||||
|
- name: Setup Environment
|
||||||
|
run: |
|
||||||
|
dir
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
mkdir ${{ env.RELEASE_NAME }}
|
||||||
|
cd ${{ env.RELEASE_NAME }}
|
||||||
|
mkdir include
|
||||||
|
mkdir lib
|
||||||
|
cd ../../../raylib
|
||||||
|
|
||||||
|
# Setup MSBuild.exe path if required
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
if: matrix.compiler == 'msvc16'
|
||||||
|
|
||||||
|
- name: Build Library (MinGW-w64 32bit)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
x86_64-w64-mingw32-gcc.exe --version
|
||||||
|
windres.exe --version
|
||||||
|
dir C:\msys64\mingw64\bin
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=x86_64-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" CUSTOM_CFLAGS=-m32
|
||||||
|
//windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
|
||||||
|
//make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
shell: cmd
|
||||||
|
if: |
|
||||||
|
matrix.compiler == 'mingw-w64' &&
|
||||||
|
matrix.arch == 'i686'
|
||||||
|
|
||||||
|
- name: Build Library (MinGW-w64 64bit)
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
${{ matrix.ARCH }}-w64-mingw32-gcc.exe --version
|
||||||
|
windres.exe --version
|
||||||
|
dir C:\msys64\mingw64\bin
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=STATIC RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib"
|
||||||
|
windres.exe -i raylib.dll.rc -o raylib.dll.rc.data -O coff --target=${{ matrix.WINDRES_ARCH }}
|
||||||
|
make PLATFORM=PLATFORM_DESKTOP CC=${{ matrix.ARCH }}-w64-mingw32-gcc.exe RAYLIB_LIBTYPE=SHARED RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
|
||||||
|
cd ..
|
||||||
|
shell: cmd
|
||||||
|
if: |
|
||||||
|
matrix.compiler == 'mingw-w64' &&
|
||||||
|
matrix.arch == 'x86_64'
|
||||||
|
|
||||||
|
- name: Build Library (MSVC16)
|
||||||
|
run: |
|
||||||
|
cd projects/VS2022
|
||||||
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release /property:Platform=${{ matrix.ARCH }}
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.lib
|
||||||
|
msbuild.exe raylib.sln /target:raylib /property:Configuration=Release.DLL /property:Platform=${{ matrix.ARCH }}
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.dll .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylib.dll
|
||||||
|
copy /Y .\build\raylib\bin\${{ matrix.VSARCHPATH }}\Release.DLL\raylib.lib .\..\..\build\${{ env.RELEASE_NAME }}\lib\raylibdll.lib
|
||||||
|
cd ../..
|
||||||
|
shell: cmd
|
||||||
|
if: matrix.compiler == 'msvc16'
|
||||||
|
|
||||||
|
- name: Generate Artifacts
|
||||||
|
run: |
|
||||||
|
copy /Y .\src\raylib.h .\build\${{ env.RELEASE_NAME }}\include\raylib.h
|
||||||
|
copy /Y .\src\raymath.h .\build\${{ env.RELEASE_NAME }}\include\raymath.h
|
||||||
|
copy /Y .\src\rlgl.h .\build\${{ env.RELEASE_NAME }}\include\rlgl.h
|
||||||
|
copy /Y .\CHANGELOG .\build\${{ env.RELEASE_NAME }}\CHANGELOG
|
||||||
|
copy /Y .\README.md .\build\${{ env.RELEASE_NAME }}\README.md
|
||||||
|
copy /Y .\LICENSE .\build\${{ env.RELEASE_NAME }}\LICENSE
|
||||||
|
cd build
|
||||||
|
7z a ./${{ env.RELEASE_NAME }}.zip ./${{ env.RELEASE_NAME }}
|
||||||
|
dir
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ env.RELEASE_NAME }}.zip
|
||||||
|
path: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
|
||||||
|
- name: Upload Artifact to Release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
files: ./build/${{ env.RELEASE_NAME }}.zip
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
if: github.event_name == 'release' && github.event.action == 'published'
|
||||||
37
.github/workflows/parse_api.yml
vendored
Normal file
37
.github/workflows/parse_api.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
name: Parse raylib API
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "src/raylib.h"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Update parse files
|
||||||
|
working-directory: tools/parser
|
||||||
|
run: |
|
||||||
|
make raylib_api
|
||||||
|
mv raylib_api.* output
|
||||||
|
|
||||||
|
- name: Diff parse files
|
||||||
|
id: diff
|
||||||
|
run: |
|
||||||
|
git add -N parser
|
||||||
|
git diff --name-only --exit-code
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Commit parse files
|
||||||
|
if: steps.diff.outcome == 'failure'
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add tools/parser
|
||||||
|
git commit -m "Update raylib_api.* by CI"
|
||||||
|
git push
|
||||||
70
.github/workflows/update_examples.yml
vendored
Normal file
70
.github/workflows/update_examples.yml
vendored
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
name: Update examples collection
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'examples/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- 'examples/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
|
with:
|
||||||
|
version: 'latest'
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
|
- name: Setup MSBuild
|
||||||
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
|
- name: Clone raylib.com repo to update files
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/raysan5/raylib.com.git
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Build and run rexm tool (VS2022 solution)
|
||||||
|
# rexm should update all required files in raylib and even raylib.com repo,
|
||||||
|
# but not sure if it can do that from an Action, maybe it requires manual copy
|
||||||
|
run: |
|
||||||
|
cd tools/rexm/VS2022
|
||||||
|
msbuild.exe rexm.sln /target:rexm /property:Configuration=Release /property:Platform=x64
|
||||||
|
cd ../../..
|
||||||
|
set REXM_EXAMPLES_BASE_PATH="examples"
|
||||||
|
set REXM_EXAMPLES_WEB_PATH="../raylib.com/examples"
|
||||||
|
set REXM_EXAMPLES_TEMPLATE_FILE_PATH="examples/examples_template.c"
|
||||||
|
set REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="examples/examples_template.png"
|
||||||
|
set REXM_EXAMPLES_COLLECTION_FILE_PATH="examples/examples_list.txt"
|
||||||
|
set REXM_EXAMPLES_VS2022_SLN_FILE="projects/VS2022/raylib.sln"
|
||||||
|
set EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main"
|
||||||
|
.\tools\rexm\VS2022\build\rexm\bin\x64\Release\rexm.exe update
|
||||||
|
cd ../..
|
||||||
|
shell: cmd
|
||||||
|
|
||||||
|
- name: Commit changes to raylib repo
|
||||||
|
run: |
|
||||||
|
#git config user.name "github-actions[bot]"
|
||||||
|
#git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
#git add -A
|
||||||
|
#git commit -m "Update examples collection"
|
||||||
|
#git push
|
||||||
|
|
||||||
|
- name: Push changes to raylib.com repo
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
#git config --global user.name "github-actions[bot]"
|
||||||
|
#git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
#git add examples
|
||||||
|
#git commit -m "Update web examples"
|
||||||
|
#git push origin
|
||||||
Loading…
Reference in a new issue