mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-06 03:18:14 +00:00
[workflows] (almost) rewrite update_examples.yml workflow (#5130)
* debug print the working directory * trigger it on any branch (temporarily) * nope, wrong fix * dummy commit to trigger the workflow * lets see if this works * trigger the workflow when updating it * nice typo * add missing dollar signs * debug list the contents of the repository * dir/s instead of ls * remove this, no longer needed * backslashes maybe? windows... * this should be a forward slash * remove no longer needed spam * debug check if examples dir exists * LOG is disabled apparently * ... * temporarily disable this step to save time * ubuntu maybe * bash * install deps * link libc * link libm * now to test the rest * emsdk is back * add missing shaders * Update examples collection * add indentation * remove emsdk cache * ignore emsdk cache * Update examples collection * fix errors with the find command * remove emsdk cache now * i forgot to actually add it to gitignore * fix error with git not finding anything to commit * global config instead of repo specific * clone raylib.com repo under the same owner as the raylib repo owner * add proper access token * reorganize it all * remove non-existent example * clone raylib.com before running rexm * no extra slash * Update examples collection * copy updated examples to the right place * remove unnecessary debug line from rexm.c * Update examples collection * Update examples collection * use hardcoded absolute path to make * add debug line * semicolon * fix wrong handling of make path * fix wrong cwd * rebuild raylib for web after installing it * cleanuo * conditionally push to repos, never on PR * build rexm with make for consistency * remove workflow run results * add back the examples report files * pause automatic commits * revert makefile changes * readd removed vs2022 project file --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
86
.github/workflows/update_examples.yml
vendored
86
.github/workflows/update_examples.yml
vendored
@@ -4,14 +4,18 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
|
- '.github/workflows/update_examples.yml'
|
||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
|
- 'tools/rexm/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
|
- '.github/workflows/update_examples.yml'
|
||||||
- 'examples/**'
|
- 'examples/**'
|
||||||
|
- 'tools/rexm/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -22,51 +26,51 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
version: 'latest'
|
version: 'latest'
|
||||||
actions-cache-folder: 'emsdk-cache'
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
- name: Setup MSBuild
|
- name: Clone raylib.com repo
|
||||||
uses: microsoft/setup-msbuild@v2
|
|
||||||
|
|
||||||
- name: Clone raylib.com repo to update files
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
run: |
|
||||||
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/raysan5/raylib.com.git
|
git clone https://x-access-token:${{ secrets.RAYLIB_DOT_COM_REPO_TOKEN }}@github.com/$GITHUB_REPOSITORY_OWNER/raylib.com.git
|
||||||
shell: cmd
|
shell: bash
|
||||||
|
|
||||||
- name: Build and run rexm tool (VS2022 solution)
|
- name: Build and run rexm tool (GNU Makefile)
|
||||||
# rexm should update all required files in raylib and even raylib.com repo,
|
# 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
|
# but not sure if it can do that from an Action, maybe it requires manual copy
|
||||||
run: |
|
run: |
|
||||||
cd tools/rexm/VS2022
|
sudo apt-get update && sudo apt-get install -y libopengl0 libglu1-mesa libx11-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libgl1-mesa-dev libglu1-mesa-dev
|
||||||
msbuild.exe rexm.sln /target:rexm /property:Configuration=Release /property:Platform=x64
|
cd "${{ github.workspace }}/src"
|
||||||
cd ${{ github.workspace }}\tools\rexm\VS2022\build\rexm\bin\x64\Release
|
make
|
||||||
set REXM_EXAMPLES_BASE_PATH=${{ github.workspace }}\examples
|
sudo make install
|
||||||
set REXM_EXAMPLES_WEB_PATH=${{ github.workspace }}\..\raylib.com\examples
|
make clean
|
||||||
set REXM_EXAMPLES_TEMPLATE_FILE_PATH=${{ github.workspace }}\examples\examples_template.c
|
make PLATFORM=PLATFORM_WEB
|
||||||
set REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH=${{ github.workspace }}\examples\examples_template.png
|
cd ../tools/rexm/
|
||||||
set REXM_EXAMPLES_COLLECTION_FILE_PATH=${{ github.workspace }}\examples\examples_list.txt
|
make
|
||||||
set REXM_EXAMPLES_VS2022_SLN_FILE=${{ github.workspace }}\projects\VS2022\raylib.sln
|
export REXM_EXAMPLES_BASE_PATH="${{ github.workspace }}/examples"
|
||||||
set EMSDK_PATH=${{ github.workspace }}/emsdk-cache/emsdk-main
|
export REXM_EXAMPLES_WEB_PATH="${{ github.workspace }}/raylib.com/examples"
|
||||||
dir
|
export REXM_EXAMPLES_TEMPLATE_FILE_PATH="${{ github.workspace }}/examples/examples_template.c"
|
||||||
rexm.exe build core_basic_window
|
export REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="${{ github.workspace }}/examples/examples_template.png"
|
||||||
cd ${{ github.workspace }}\..
|
export REXM_EXAMPLES_COLLECTION_FILE_PATH="${{ github.workspace }}/examples/examples_list.txt"
|
||||||
dir
|
export REXM_EXAMPLES_VS2022_SLN_FILE="${{ github.workspace }}/projects/VS2022/raylib.sln"
|
||||||
shell: cmd
|
export EMSDK_PATH="${{ github.workspace }}/emsdk-cache/emsdk-main"
|
||||||
|
./rexm update
|
||||||
- name: Commit changes to raylib repo
|
shell: bash
|
||||||
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
|
- name: Commit changes to raylib repo
|
||||||
|
if: github.event_name == 'push' && false
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
#git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
#git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
#git add examples
|
git add -A
|
||||||
#git commit -m "Update web examples"
|
git commit -m "Update examples collection" || echo "git exited with code 1, nothing changed"
|
||||||
#git push origin
|
git push
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Push changes to raylib.com repo
|
||||||
|
if: github.event_name == 'push' && false
|
||||||
|
run: |
|
||||||
|
cd raylib.com
|
||||||
|
git add -A
|
||||||
|
git commit -m "Update web examples" || echo "git exited with code 1, nothing changed"
|
||||||
|
git push origin
|
||||||
|
shell: bash
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -116,3 +116,6 @@ tools/parser/raylib_parser
|
|||||||
tools/rexm/rexm.exe
|
tools/rexm/rexm.exe
|
||||||
tools/rexm/rexm
|
tools/rexm/rexm
|
||||||
|
|
||||||
|
# CI
|
||||||
|
emsdk-cache/
|
||||||
|
raylib.com/
|
||||||
|
Reference in New Issue
Block a user