|
| 1 | +name: Build Godot with ECMAScript |
| 2 | +# TODO: Investigate making this on tag instead of push since builds take so long |
| 3 | +on: [push] |
| 4 | + |
| 5 | +# TODO: Need to also publish release builds without tools (for exporters) for linux, windows, mac, ios, android |
| 6 | +jobs: |
| 7 | + build_linux: |
| 8 | + name: Build Linux |
| 9 | + runs-on: ubuntu-latest |
| 10 | + container: |
| 11 | + # See how this image is built at https://github.com/Flux159/godot-docker |
| 12 | + image: flux159/godot:1.0.0 |
| 13 | + steps: |
| 14 | + - name: Get repositories |
| 15 | + # TODO: Migrate this to use checkout action for ECMAScript.git rather than clone |
| 16 | + run: | |
| 17 | + rm -rf /godot && cd / |
| 18 | + git clone https://github.com/godotengine/godot.git |
| 19 | + cd ./godot |
| 20 | + git checkout 3.2.2-stable |
| 21 | + git clone https://github.com/GodotExplorer/ECMAScript.git ./modules/ECMAScript |
| 22 | + - name: Build godot with ECMAScript module for Linux |
| 23 | + run: | |
| 24 | + cd /godot |
| 25 | + scons -j8 p=x11 |
| 26 | + ls ./bin |
| 27 | + - name: Publish artifact |
| 28 | + uses: actions/upload-artifact@v2 |
| 29 | + with: |
| 30 | + name: godotjs.x11.tools.64 |
| 31 | + path: /godot/bin/godot.x11.tools.64 |
| 32 | + build_windows: |
| 33 | + name: Build Windows |
| 34 | + runs-on: ubuntu-latest |
| 35 | + container: |
| 36 | + image: flux159/godot:1.0.0 |
| 37 | + steps: |
| 38 | + - name: Get repositories |
| 39 | + # TODO: Migrate this to use checkout action for ECMAScript.git rather than clone |
| 40 | + run: | |
| 41 | + rm -rf /godot && cd / |
| 42 | + git clone https://github.com/godotengine/godot.git |
| 43 | + cd ./godot |
| 44 | + git checkout 3.2.2-stable |
| 45 | + git clone https://github.com/GodotExplorer/ECMAScript.git ./modules/ECMAScript |
| 46 | + - name: Build godot with ECMAScript module for Windows |
| 47 | + run: | |
| 48 | + cd /godot |
| 49 | + update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
| 50 | + update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix |
| 51 | + update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix |
| 52 | + update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix |
| 53 | + scons -j8 p=windows bits=64 |
| 54 | + ls ./bin |
| 55 | + - name: Publish artifact |
| 56 | + uses: actions/upload-artifact@v2 |
| 57 | + with: |
| 58 | + name: godotjs.windows.tools.64.exe |
| 59 | + path: /godot/bin/godot.windows.tools.64.exe |
| 60 | + build_mac: |
| 61 | + name: Build Mac |
| 62 | + runs-on: macos-latest |
| 63 | + steps: |
| 64 | + - name: Get dependencies |
| 65 | + run: | |
| 66 | + brew install scons yasm |
| 67 | + - name: Get repositories |
| 68 | + # TODO: Migrate this to use checkout action for ECMAScript.git rather than clone |
| 69 | + run: | |
| 70 | + cd ~ |
| 71 | + git clone https://github.com/godotengine/godot.git |
| 72 | + cd ./godot |
| 73 | + git checkout 3.2.2-stable |
| 74 | + git clone https://github.com/GodotExplorer/ECMAScript.git ./modules/ECMAScript |
| 75 | + - name: Build godot with ECMAScript module for MacOS |
| 76 | + # TODO: Support apple silicon with 3.2.3 for universal binaries - https://docs.godotengine.org/en/stable/development/compiling/compiling_for_osx.html |
| 77 | + run: | |
| 78 | + cd ~/godot |
| 79 | + scons -j8 p=osx arch=x86_64 |
| 80 | + ls ./bin |
| 81 | + - name: Publish artifact |
| 82 | + uses: actions/upload-artifact@v2 |
| 83 | + with: |
| 84 | + name: godotjs.osx.tools.x86_64 |
| 85 | + path: ~/godot/bin/godot.osx.tools.x86_64 |
| 86 | + build_html5: |
| 87 | + name: Build HTML5 Exporter |
| 88 | + runs-on: ubuntu-latest |
| 89 | + container: |
| 90 | + image: flux159/godot:1.0.0 |
| 91 | + steps: |
| 92 | + - name: Get repositories |
| 93 | + # TODO: Migrate this to use checkout action for ECMAScript.git rather than clone |
| 94 | + run: | |
| 95 | + rm -rf /godot && cd / |
| 96 | + git clone https://github.com/godotengine/godot.git |
| 97 | + cd ./godot |
| 98 | + git checkout 3.2.2-stable |
| 99 | + git clone https://github.com/GodotExplorer/ECMAScript.git ./modules/ECMAScript |
| 100 | + - name: Build godot with ECMAScript for HTML5 platform |
| 101 | + # This needs to run in bash for source command |
| 102 | + run: | |
| 103 | + bash -c "/emsdk/emsdk activate latest && chmod +x /emsdk/emsdk_env.sh && cd /emsdk && source ./emsdk_env.sh && cd /godot && scons -j8 p=javascript tools=no target=release && ls ./bin" |
| 104 | + - name: Publish artifact |
| 105 | + uses: actions/upload-artifact@v2 |
| 106 | + with: |
| 107 | + name: godotjs.javascript.opt.zip |
| 108 | + path: /godot/bin/godot.javascript.opt.zip |
0 commit comments