Fix Android CXXFLAGS, fix compile Linux/Android libs with -fPIC #138
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: Build and Test | |
| on: [push, pull_request] | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build_linux: | |
| name: ${{ matrix.platform }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [linux, windows, android] | |
| include: | |
| - platform: linux | |
| packages: [g++-multilib] | |
| - platform: windows | |
| packages: [g++-mingw-w64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install ninja-build ${{ join(matrix.packages, ' ') }} | |
| - name: Cache build files | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/ | |
| key: ${{ matrix.platform }} | |
| - name: Build artifact | |
| run: | | |
| make ${{ matrix.platform }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: | | |
| addons/lua-gdextension/build/**/libluagdextension.* | |
| build_macos: | |
| name: ${{ matrix.platform }} | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [macos, ios] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install dependencies | |
| run: | | |
| brew install ninja | |
| - name: Cache build files | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/ | |
| key: ${{ matrix.platform }} | |
| - name: Build artifact | |
| run: | | |
| make ${{ matrix.platform }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: | | |
| addons/lua-gdextension/build/**/libluagdextension.* | |
| test_distribution: | |
| name: Test ${{ matrix.name }} | |
| needs: [build_linux, build_macos] | |
| runs-on: ${{ matrix.runner-os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: Linux | |
| runner-os: ubuntu-latest | |
| godot-release: 4.3-stable/Godot_v4.3-stable_linux.x86_64.zip | |
| godot-bin: ./Godot_v4.3-stable_linux.x86_64 | |
| - name: Windows | |
| runner-os: windows-latest | |
| godot-release: 4.3-stable/Godot_v4.3-stable_win64.exe.zip | |
| godot-bin: ./Godot_v4.3-stable_win64.exe | |
| - name: macOS | |
| runner-os: macos-latest | |
| godot-release: 4.3-stable/Godot_v4.3-stable_macos.universal.zip | |
| godot-bin: ./Godot.app/Contents/MacOS/Godot | |
| env: | |
| GODOT_BIN: ${{ matrix.godot-bin }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| id: download | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Copy artifacts to build folder | |
| run: cp -r '${{ steps.download.outputs.download-path }}'/**/libluagdextension* addons/lua-gdextension/build | |
| env: | |
| MSYS_NO_PATHCONV: 1 | |
| - name: Download Godot | |
| run: | | |
| curl --location https://github.com/godotengine/godot/releases/download/${{ matrix.godot-release }} --output godot.zip | |
| unzip godot.zip | |
| - name: Run tests | |
| run: | | |
| make test | |
| distribute_zip: | |
| name: Distribute zip | |
| needs: [build_linux, build_macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| id: download | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Copy artifacts to build folder | |
| run: cp -r ${{ steps.download.outputs.download-path }}/**/libluagdextension* addons/lua-gdextension/build | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lua-gdextension | |
| path: | | |
| LICENSE | |
| addons/lua-gdextension/LICENSE | |
| addons/lua-gdextension/*.gdextension | |
| addons/lua-gdextension/build/**/libluagdextension* | |