Skip to content

Commit

Permalink
Run everything important on mac, others on win/linux
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Jan 30, 2025
1 parent 9be1a9e commit 8a4dca4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 18 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
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 }}
Expand Down

0 comments on commit 8a4dca4

Please sign in to comment.