diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1bb2b36..bd8f9a0 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,11 +11,11 @@ env: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Deps run: sudo apt -y install libudev-dev - name: ci - run: ./ci.sh --install-esp + run: ./ci.sh diff --git a/ci-esp.sh b/ci-esp.sh new file mode 100755 index 0000000..4b62fd9 --- /dev/null +++ b/ci-esp.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -euxo pipefail + +# build cargo-embassy +cargo build --release + +test_dir="/tmp/ci" + +# create test directory +if [ -d $test_dir ]; then + rm -r $test_dir +fi + +cwd=`pwd` + +mkdir $test_dir +cd $test_dir + +# generation +$cwd/target/release/cargo-embassy embassy init test-esp32c3 --chip esp32c3 +$cwd/target/release/cargo-embassy embassy init test-esp32s3 --chip esp32s3 + +# esp toolchain +if [ "${1-""}" = "--install-esp" ]; then + cargo install espup + espup install +else + echo "Skipping ESP toolchain installation." +fi + +. $HOME/export-esp.sh + +# compile +cd ../test-esp32c3; cargo build --release +cd ../test-esp32s3; cargo build --release + +# clean up +cd ../.. +# rm -r ci diff --git a/ci.sh b/ci.sh index 797514e..742c3d1 100755 --- a/ci.sh +++ b/ci.sh @@ -27,27 +27,11 @@ $cwd/target/release/cargo-embassy embassy init test-stm32g4 --chip stm32g431rb - $cwd/target/release/cargo-embassy embassy init test-nrf52840 --chip nrf52840 $cwd/target/release/cargo-embassy embassy init test-nrf52832 --chip nrf52832-xxab --softdevice s132 -# esp32 -$cwd/target/release/cargo-embassy embassy init test-esp32c3 --chip esp32c3 -$cwd/target/release/cargo-embassy embassy init test-esp32s3 --chip esp32s3 - -# esp toolchain -if [ "${1-""}" = "--install-esp" ]; then - cargo install espup - espup install -else - echo "Skipping ESP toolchain installation." -fi - -. $HOME/export-esp.sh - # compile cd test-stm32g0; cargo build; cargo build --no-default-features --release cd ../test-stm32g4; cargo build; cargo build --no-default-features --release cd ../test-nrf52840; cargo build; cargo build --no-default-features --release cd ../test-nrf52832; cargo build; cargo build --no-default-features --release -cd ../test-esp32c3; cargo build --release -cd ../test-esp32s3; cargo build --release # clean up cd ../..