1111
1212jobs :
1313 build :
14- runs-on : windows -latest
14+ runs-on : ubuntu -latest
1515
1616 steps :
1717 - name : Checkout
@@ -22,49 +22,51 @@ jobs:
2222 with :
2323 version : ' latest'
2424 actions-cache-folder : ' emsdk-cache'
25-
26- - name : Setup MSBuild
27- uses : microsoft/setup-msbuild@v2
28-
25+
2926 - name : Clone raylib.com repo to update files
30- env :
31- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32- run : |
33- git clone https://x-access-token:${GITHUB_TOKEN}@github.com/raysan5/raylib.com.git
34- shell : cmd
35-
36- - name : Build and run rexm tool (VS2022 solution)
37- # rexm should update all required files in raylib and even raylib.com repo,
38- # but not sure if it can do that from an Action, maybe it requires manual copy
3927 run : |
40- cd tools/rexm/VS2022
41- msbuild.exe rexm.sln /target:rexm /property:Configuration=Release /property:Platform=x64
42- cd ../../..
43- set REXM_EXAMPLES_BASE_PATH="examples"
44- set REXM_EXAMPLES_WEB_PATH="../raylib.com/examples"
45- set REXM_EXAMPLES_TEMPLATE_FILE_PATH="examples/examples_template.c"
46- set REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="examples/examples_template.png"
47- set REXM_EXAMPLES_COLLECTION_FILE_PATH="examples/examples_list.txt"
48- set REXM_EXAMPLES_VS2022_SLN_FILE="projects/VS2022/raylib.sln"
49- set EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main"
50- .\tools\rexm\VS2022\build\rexm\bin\x64\Release\rexm.exe update
51- cd ../..
52- shell : cmd
53-
54- - name : Commit changes to raylib repo
28+ git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/raysan5/raylib.com.git
29+ shell : bash
30+
31+ - name : Build and run rexm tool (requires GNU Makefile)
32+ # "rexm update" validates and updates all required examples in raylib and even raylib.com repos,
33+ # note that it calls examples/Makefile.Web internally, so it requires [make] tool available
5534 run : |
56- #git config user.name "github-actions[bot]"
57- #git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58- #git add -A
59- #git commit -m "Update examples collection"
60- #git push
35+ 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
36+ cd "${{ github.workspace }}/src"
37+ make PLATFORM=PLATFORM_DESKTOP
38+ sudo make install
39+ make clean
40+ make PLATFORM=PLATFORM_WEB
41+ cd ../tools/rexm/
42+ make
43+ export REXM_EXAMPLES_BASE_PATH="${{ github.workspace }}/examples"
44+ export REXM_EXAMPLES_WEB_PATH="${{ github.workspace }}/raylib.com/examples"
45+ export REXM_EXAMPLES_TEMPLATE_FILE_PATH="${{ github.workspace }}/examples/examples_template.c"
46+ export REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="${{ github.workspace }}/examples/examples_template.png"
47+ export REXM_EXAMPLES_COLLECTION_FILE_PATH="${{ github.workspace }}/examples/examples_list.txt"
48+ export REXM_EXAMPLES_VS2022_SLN_FILE="${{ github.workspace }}/projects/VS2022/raylib.sln"
49+ export EMSDK_PATH="${{ github.workspace }}/emsdk-cache/emsdk-main"
50+ ./rexm update
51+ shell : bash
6152
62- - name : Push changes to raylib.com repo
53+ - name : Commit changes to raylib repo (DISABLED)
54+ if : github.event_name == 'push' && false
6355 env :
6456 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6557 run : |
66- #git config --global user.name "github-actions[bot]"
67- #git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
68- #git add examples
69- #git commit -m "Update web examples"
70- #git push origin
58+ git config --global user.name "github-actions[bot]"
59+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
60+ git add -A
61+ git commit -m "Update examples collection" || echo "git exited with code 1, nothing changed"
62+ git push
63+ shell : bash
64+
65+ - name : Push changes to raylib.com repo (DISABLED)
66+ if : github.event_name == 'push' && false
67+ run : |
68+ cd raylib.com
69+ git add -A
70+ git commit -m "Update web examples" || echo "git exited with code 1, nothing changed"
71+ git push origin
72+ shell : bash
0 commit comments