From ffba59d3d52336f683304c945288229129904aaf Mon Sep 17 00:00:00 2001 From: Ralf Fuest Date: Sat, 3 Feb 2024 16:40:26 +0100 Subject: [PATCH] Build all examples in CI --- .github/workflows/ci.yaml | 30 +++++++++++++++---- .../examples/spi-ili9486-esp32-c3/Cargo.toml | 2 ++ .../spi-st7789-rpi-zero-w/.cargo/config.toml | 3 ++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 15483d1..0c5160f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -50,14 +50,34 @@ jobs: run: | cargo test - build-example-parallel-ili9341-rp-pico: + build-example: + name: Build example runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + example: + - parallel_ili9341_rp_pico + - spi-ili9486-esp32-c3 + - spi-st7789-rpi-zero-w + include: + - target: thumbv6m-none-eabi + example: parallel_ili9341_rp_pico + - target: riscv32imc-unknown-none-elf + example: spi-ili9486-esp32-c3 + - target: arm-unknown-linux-gnueabihf + example: spi-st7789-rpi-zero-w + steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: - target: thumbv6m-none-eabi + target: ${{ matrix.target }} + - if: ${{ startsWith(matrix.target, 'arm') }} + run: | + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabihf - run: cargo install flip-link - - name: Build example - run: cargo build - working-directory: ./mipidsi/examples/parallel_ili9341_rp_pico + - name: Build ${{ matrix.example }} example + run: cargo build --target ${{ matrix.target }} + working-directory: ./mipidsi/examples/${{ matrix.example }} diff --git a/mipidsi/examples/spi-ili9486-esp32-c3/Cargo.toml b/mipidsi/examples/spi-ili9486-esp32-c3/Cargo.toml index da0a410..288e297 100644 --- a/mipidsi/examples/spi-ili9486-esp32-c3/Cargo.toml +++ b/mipidsi/examples/spi-ili9486-esp32-c3/Cargo.toml @@ -11,3 +11,5 @@ embedded-graphics = "0.8.0" display-interface-spi = "0.4.1" mipidsi = "0.7.1" fugit = "0.3.7" + +[workspace] diff --git a/mipidsi/examples/spi-st7789-rpi-zero-w/.cargo/config.toml b/mipidsi/examples/spi-st7789-rpi-zero-w/.cargo/config.toml index 6fb7d4c..4f5d56f 100644 --- a/mipidsi/examples/spi-st7789-rpi-zero-w/.cargo/config.toml +++ b/mipidsi/examples/spi-st7789-rpi-zero-w/.cargo/config.toml @@ -1,2 +1,5 @@ [target.arm-unknown-linux-musleabihf] linker = "arm-linux-musleabihf-gcc" + +[target.arm-unknown-linux-gnueabihf] +linker = "arm-linux-gnueabihf-gcc"