From 8a4dca48e03706e86045312b9fa8bffc094fd732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Thu, 30 Jan 2025 15:24:57 +0100 Subject: [PATCH] Run everything important on mac, others on win/linux --- .github/workflows/ci.yml | 28 ++++++++++++++++++---------- .github/workflows/hil.yml | 22 ++++++++++++++-------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b4fc2fbba..c2c2bcfb45c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: esp-hal: name: esp-hal (${{ matrix.device.soc }}) - runs-on: ubuntu-latest + runs-on: macos-m1-self-hosted env: SSID: SSID PASSWORD: PASSWORD @@ -70,13 +70,21 @@ jobs: - uses: dtolnay/rust-toolchain@v1 with: target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf - toolchain: stable + toolchain: ${{ env.MSRV }} components: rust-src - # Install the Rust toolchain for Xtensa devices: - - uses: esp-rs/xtensa-toolchain@v1.5 - with: - ldproxy: false - version: 1.84.0.0 + - name: install esp toolchain + run: | + if [ ! -f "$HOME/.cargo/bin/espup" ]; then + curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-aarch64-apple-darwin -o "$HOME/.cargo/bin/espup" + chmod a+x "$HOME/.cargo/bin/espup" + fi + + source "$HOME/.cargo/env" + "$HOME/.cargo/bin/espup" install -l debug --export-file $HOME/exports --targets all --toolchain-version 1.84.0.0 + source "$HOME/exports" + echo "$PATH" >> "$GITHUB_PATH" + echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >> "$GITHUB_ENV" + rustup override unset - uses: Swatinem/rust-cache@v2 @@ -88,7 +96,7 @@ jobs: toolchain: ${{ matrix.device.toolchain }} extras: - runs-on: ubuntu-latest + runs-on: [windows-x86_64-self-hosted, linux-x86_64-self-hosted] steps: - uses: actions/checkout@v4 @@ -173,7 +181,7 @@ jobs: # Format rustfmt: - runs-on: ubuntu-latest + runs-on: [windows-x86_64-self-hosted, linux-x86_64-self-hosted] steps: - uses: actions/checkout@v4 @@ -192,7 +200,7 @@ jobs: # host tests host-tests: - runs-on: ubuntu-latest + runs-on: [windows-x86_64-self-hosted, linux-x86_64-self-hosted] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/hil.yml b/.github/workflows/hil.yml index 2541c40da72..9351b061bc1 100644 --- a/.github/workflows/hil.yml +++ b/.github/workflows/hil.yml @@ -30,7 +30,7 @@ env: jobs: build-xtasks: name: Build xtasks | ${{ matrix.host.arch }} - runs-on: ubuntu-latest + runs-on: [windows-x86_64-self-hosted, linux-x86_64-self-hosted] strategy: fail-fast: false @@ -70,7 +70,7 @@ jobs: build-tests: name: Build HIL Tests | ${{ matrix.target.soc }} - runs-on: ubuntu-latest + runs-on: macos-m1-self-hosted strategy: fail-fast: false @@ -111,12 +111,18 @@ jobs: components: rust-src # Install the Rust toolchain for Xtensa devices: - if: contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.target.soc) - uses: esp-rs/xtensa-toolchain@v1.5 - with: - buildtargets: ${{ matrix.target.soc }} - default: true - ldproxy: false - version: 1.84.0.0 + run: | + if [ ! -f "$HOME/.cargo/bin/espup" ]; then + curl -L https://github.com/esp-rs/espup/releases/latest/download/espup-aarch64-apple-darwin -o "$HOME/.cargo/bin/espup" + chmod a+x "$HOME/.cargo/bin/espup" + fi + + source "$HOME/.cargo/env" + "$HOME/.cargo/bin/espup" install -l debug --export-file $HOME/exports --targets all --toolchain-version 1.84.0.0 + source "$HOME/exports" + echo "$PATH" >> "$GITHUB_PATH" + echo "LIBCLANG_PATH=${LIBCLANG_PATH}" >> "$GITHUB_ENV" + rustup override unset - name: Build tests run: cargo xtask build-tests ${{ matrix.target.soc }}