diff --git a/.cargo/config.arm b/.cargo/config.arm new file mode 100644 index 00000000..484fdde6 --- /dev/null +++ b/.cargo/config.arm @@ -0,0 +1,6 @@ +# Copy this file as 'config' for assistance while developing features that +# target ARM and (on Debian) install the gcc-arm-linux-gnueabihf package. +[build] +target = "arm-unknown-linux-gnueabihf" +[target.arm-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc" diff --git a/.cargo/config.rpi b/.cargo/config.armv7 similarity index 100% rename from .cargo/config.rpi rename to .cargo/config.armv7 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9147fcaa..af4ab15c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,23 @@ name: Build release on: [push, pull_request] jobs: + linux-arm-rpi: + runs-on: ubuntu-latest + steps: + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + target: arm-unknown-linux-gnueabihf + - uses: actions/checkout@v4 + - run: sudo apt update + - run: sudo apt install gcc-arm-linux-gnueabihf + - run: ./.github/workflows/release.sh linux-arm-rpi + - uses: actions/upload-artifact@v4 + with: + name: endbasic-linux-arm-rpi + path: endbasic-linux-arm-rpi/* + retention-days: 1 + linux-armv7-rpi: runs-on: ubuntu-latest steps: @@ -75,7 +92,7 @@ jobs: create-release: if: startsWith(github.ref, 'refs/tags/') - needs: [linux-armv7-rpi, linux-x86_64-sdl, macos-arm64-sdl, windows-x86_64-sdl] + needs: [linux-arm-rpi, linux-armv7-rpi, linux-x86_64-sdl, macos-arm64-sdl, windows-x86_64-sdl] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release.sh b/.github/workflows/release.sh index 6d88865e..6d0e6cf7 100755 --- a/.github/workflows/release.sh +++ b/.github/workflows/release.sh @@ -68,9 +68,11 @@ main() { local target= case "${name}" in - linux-armv7-rpi) + linux-arm-rpi|linux-armv7-rpi) + local arch="$(echo "${name}" | cut -d - -f 2)" + [ ! -f .cargo/config ] || err "Won't override existing .cargo/config" - cp .cargo/config.rpi .cargo/config + cp ".cargo/config.${arch}" .cargo/config # TODO(jmmv): Should figure out how to cross-compile with the native TLS library # instead of doing this hack. sed -i s,native-tls,rustls-tls,g client/Cargo.toml @@ -79,7 +81,7 @@ main() { ( cd cli && cargo build --release --features=rpi ) rm -f .cargo/config - cp ./target/armv7-unknown-linux-gnueabihf/release/endbasic "${distname}" + cp "./target/${arch}-unknown-linux-gnueabihf/release/endbasic" "${distname}" ;; macos*) diff --git a/NEWS.md b/NEWS.md index f38d07c9..13f0385d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -53,6 +53,8 @@ STILL UNDER DEVELOPMENT; NOT RELEASED YET. * Fixed the rendering of zero-sized rectangles in the SDL console so that debug builds don't crash and so that the behavior matches the web console. +* Issue #275: Added a release build for ARM v6. + ## Changes in version 0.11.1 **Released on 2024-09-14.**