|
91 | 91 | name: Build on Native Runner (target OS/CPU = source OS/CPU)
|
92 | 92 | strategy:
|
93 | 93 | matrix:
|
94 |
| - runner: [macos_x64, raspberry_pi_64, raspberry_pi_32] |
| 94 | + runner: [ |
| 95 | + macos_x64 |
| 96 | + # We use arm-runner for Raspberry Pi builds now, to not have costs of maintaining our own runners. |
| 97 | + # raspberry_pi_64, |
| 98 | + # raspberry_pi_32 |
| 99 | + ] |
95 | 100 | runs-on: ${{ matrix.runner }}
|
96 | 101 | steps:
|
97 | 102 | - uses: actions/checkout@v4
|
@@ -138,6 +143,69 @@ jobs:
|
138 | 143 | *.tar.gz
|
139 | 144 | #if-no-files-found: error
|
140 | 145 |
|
| 146 | + build_arm_runner: |
| 147 | + name: Build on ARM Runner (for Raspberry Pi) |
| 148 | + runs-on: ubuntu-latest |
| 149 | + strategy: |
| 150 | + matrix: |
| 151 | + arch: [armv7l, aarch64] |
| 152 | + include: |
| 153 | + # Raspberry Pi 32-bit (Arm), bullseye (older version, used on Raspberry Pi 4 by default) |
| 154 | + - arch: armv7l |
| 155 | + cpu: cortex-a7 |
| 156 | + base_image: dietpi:rpi_armv7_bullseye |
| 157 | + # Raspberry Pi 64-bit (Aarch64), latest (bookworm) |
| 158 | + - arch: aarch64 |
| 159 | + cpu: cortex-a53 |
| 160 | + base_image: raspios_lite_arm64:latest |
| 161 | + steps: |
| 162 | + - uses: actions/checkout@v4 |
| 163 | + - uses: pguyot/arm-runner-action@v2 |
| 164 | + with: |
| 165 | + base_image: ${{ matrix.base_image }} |
| 166 | + cpu: ${{ matrix.cpu }} |
| 167 | + shell: /bin/bash -eo pipefail |
| 168 | + image_additional_mb: 6000 |
| 169 | + # Avoids the need for copy_artifact_path later. |
| 170 | + bind_mount_repository: true |
| 171 | + commands: | |
| 172 | + # Useful string to grep logs, because log of script execution is somewhat buried in the middle of pguyot/arm-runner-action log |
| 173 | + echo 'CGE script starts here' |
| 174 | +
|
| 175 | + # Show system info |
| 176 | + uname -a |
| 177 | +
|
| 178 | + # Install FPC and other Linux dependencies |
| 179 | + sudo apt-get update |
| 180 | + sudo apt-get --no-install-recommends -y install libgl-dev fpc git make unzip sed zip |
| 181 | +
|
| 182 | + # Check versions (and availability) of our requirements early |
| 183 | + fpc -iV |
| 184 | + make --version |
| 185 | + sed --version |
| 186 | +
|
| 187 | + # Setup Castle Game Engine |
| 188 | + ARM_RUNNER_WORKSPACE=`pwd` |
| 189 | + export "CASTLE_ENGINE_PATH=$ARM_RUNNER_WORKSPACE/castle-engine" |
| 190 | + export "PATH=$PATH:$CASTLE_ENGINE_PATH/tools/build-tool/" |
| 191 | + git clone --depth 1 --single-branch --branch ${{ env.engine_tag }} https://github.com/castle-engine/castle-engine/ |
| 192 | + cd $CASTLE_ENGINE_PATH/tools/build-tool/ |
| 193 | + ./castle-engine_compile.sh |
| 194 | + cd $ARM_RUNNER_WORKSPACE |
| 195 | +
|
| 196 | + # Package application |
| 197 | + castle-engine compile --manifest-name=CastleEngineManifest.converter.xml |
| 198 | + castle-engine package |
| 199 | +
|
| 200 | + - name: Archive Artifacts |
| 201 | + uses: actions/upload-artifact@v4 |
| 202 | + with: |
| 203 | + name: raspberry-pi-${{ matrix.runner }}-build |
| 204 | + path: | |
| 205 | + *.zip |
| 206 | + *.tar.gz |
| 207 | + #if-no-files-found: error |
| 208 | + |
141 | 209 | release:
|
142 | 210 | name: Release
|
143 | 211 | runs-on: ubuntu-latest
|
|
0 commit comments