GitHub Actions: Add Linux ARM64 build #342
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: C/C++ CI | |
| on: [push, pull_request, workflow_dispatch] | |
| env: | |
| # Only used for the cache key. Increment version to force clean build. | |
| GODOT_BASE_BRANCH: master | |
| SCONS_CACHE: ${{ github.workspace }}/.scons-cache/ | |
| jobs: | |
| linux-x64: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Godot build cache | |
| uses: ./godot-cpp/.github/actions/godot-cache | |
| with: | |
| cache-name: linux-x86_64 | |
| continue-on-error: true | |
| - name: Build for Linux editor x86_64 | |
| run: | | |
| pip3 install scons | |
| scons platform=linux arch=x86_64 target=editor generate_bindings=yes | |
| ldd addons/godot-git-plugin/linux/*.so | |
| - name: Prepare artifact | |
| run: | | |
| mkdir out | |
| mv addons out/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libgit_plugin.linux.x86_64.editor.so-${{ github.sha }} | |
| if-no-files-found: error | |
| path: | | |
| out/ | |
| linux-arm: | |
| runs-on: ubuntu-22.04-arm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Godot build cache | |
| uses: ./godot-cpp/.github/actions/godot-cache | |
| with: | |
| cache-name: linux-arm | |
| continue-on-error: true | |
| - name: Build for Linux editor arm | |
| run: | | |
| pip3 install scons | |
| scons platform=linux arch=aarch64 target=editor generate_bindings=yes | |
| ldd addons/godot-git-plugin/linux/*.so | |
| - name: Prepare artifact | |
| run: | | |
| mkdir out | |
| mv addons out/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libgit_plugin.linux.aarch64.editor.so-${{ github.sha }} | |
| if-no-files-found: error | |
| path: | | |
| out/ | |
| windows-x64: | |
| runs-on: windows-2022 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Godot build cache | |
| uses: ./godot-cpp/.github/actions/godot-cache | |
| with: | |
| cache-name: windows-x86_64 | |
| - uses: ilammy/msvc-dev-cmd@v1 # For dumpbin. | |
| - uses: ilammy/setup-nasm@v1 | |
| - name: Build for Windows editor x86_64 | |
| shell: powershell | |
| run: | | |
| pip3 install scons | |
| scons platform=windows arch=x86_64 target=editor generate_bindings=yes | |
| dumpbin /dependents .\addons\godot-git-plugin\windows\*.dll | |
| - name: Prepare artifact | |
| shell: bash | |
| run: | | |
| # Not needed to use the plugin. | |
| rm -f addons/godot-git-plugin/windows/*.{exp,lib} | |
| mkdir out | |
| mv addons out/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libgit_plugin.windows.x86_64.editor.dll-${{ github.sha }} | |
| if-no-files-found: error | |
| path: | | |
| out/ | |
| macos-universal: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Godot build cache | |
| uses: ./godot-cpp/.github/actions/godot-cache | |
| with: | |
| cache-name: macos-universal | |
| - name: Build for macOS editor universal | |
| run: | | |
| pip install scons | |
| scons platform=macos arch=universal target=editor generate_bindings=yes macos_deployment_target=10.13 | |
| otool -L addons/godot-git-plugin/macos/*.dylib | |
| - name: Prepare artifact | |
| run: | | |
| mkdir out | |
| mv addons out/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: libgit_plugin.macos.universal.editor.dylib-${{ github.sha }} | |
| if-no-files-found: error | |
| path: | | |
| out/ |