Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 46 additions & 3 deletions .github/workflows/installer-check.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Test installer by building template projects

env:
xtensa-toolchain-version: '1.62.1.0'

on:
push:
paths:
Expand Down Expand Up @@ -104,10 +107,12 @@ jobs:
cd test-${{ matrix.board }}
cargo build
crate-check:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
extra-crates: ["", "ldproxy", "espflash cargo-espflash ldproxy cargo-generate wokwi-server web-flash"]
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -118,10 +123,9 @@ jobs:
with:
ref: ${{ github.event.inputs.rust-build-branch }}
- name: Install toolchain
run: |
./install-rust-toolchain.sh \
--extra-crates "espflash cargo-espflash ldproxy cargo-generate wokwi-server web-flash"
run: ./install-rust-toolchain.sh --extra-crates "${{ matrix.extra-crates }}"
minified-llvm:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
Expand All @@ -140,3 +144,42 @@ jobs:
run: |
./install-rust-toolchain.sh \
--minified-llvm "${{ matrix.minified-llvm }}"
installation-modes:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
run: |
./install-rust-toolchain.sh --installation-mode "install"
- name: Reinstall toolchain
run: |
./install-rust-toolchain.sh --installation-mode "reinstall"
- name: Uninstall toolchain
run: |
./install-rust-toolchain.sh --installation-mode "uninstall"
test-arguments:
if: github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
arguments: ["", "--toolchain-version $xtensa-toolchain-version --export-file export-esp-rust.sh", "--build-target all"]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install toolchain
run: |
./install-rust-toolchain.sh "${{ matrix.arguments }}"
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ source export-esp-rust.sh
- `-e|--extra-crates`: Extra crates to install. Defaults to: `ldproxy cargo-espflash`
- `-f|--export-file`: Destination of the export file generated.
- `-i|--installation-mode`: Installation mode: [`install, reinstall, uninstall`]. Defaults to: `install`
- `-k|--minified-llvm`: Use minified LLVM. Possible values: [`YES, NO`]. Defaults to: `YES`
- `-l|--llvm-version`: LLVM version.
- `-m|--minified-esp-idf`: [Only applies if using `-s|--esp-idf-version`]. Deletes some idf folders to save space. Possible values [`YES, NO`]
- `-m|--minified-esp-idf`: [Only applies if using `-s|--esp-idf-version`]. Deletes some idf folders to save space. Possible values [`YES, NO`]. Defaults to: `NO`
- `-n|--nightly-version`: Nightly Rust toolchain version. Defaults to: `nightly`
- `-r|--rustup-home`: Path to .rustup. Defaults to: `~/.rustup`
- `-s|--esp-idf-version`: [ESP-IDF branch](https://github.com/espressif/esp-idf/branches) to install. When empty, no esp-idf is installed. Default: `""`
- `-t|--toolchain-version`: Xtensa Rust toolchain version
- `-x|--clear-cache`: Removes cached distribution files. Possible values: [`YES, NO`]
- `-x|--clear-cache`: Removes cached distribution files. Possible values: [`YES, NO`]. Defaults to: `YES`

### Windows x86_64 GNU

Expand Down
16 changes: 8 additions & 8 deletions install-rust-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,10 @@ elif [[ ${ARCH} == "x86_64-unknown-linux-gnu" ]]; then
ESPFLASH_BIN="${CARGO_HOME}/bin/espflash"
LDPROXY_URL="https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-${ARCH}.zip"
LDPROXY_BIN="${CARGO_HOME}/bin/ldproxy"
if [[ "${EXTRA_CRATES}" =~ "cargo-generate" ]]; then
GENERATE_URL="https://github.com/cargo-generate/cargo-generate/releases/latest/download/cargo-generate-${GENERATE_VERSION}-${ARCH}.tar.gz"
fi
GENERATE_BIN="${CARGO_HOME}/bin/cargo-generate"
# if [[ "${EXTRA_CRATES}" =~ "cargo-generate" ]]; then
# GENERATE_URL="https://github.com/cargo-generate/cargo-generate/releases/latest/download/cargo-generate-${GENERATE_VERSION}-${ARCH}.tar.gz"
# fi
# GENERATE_BIN="${CARGO_HOME}/bin/cargo-generate"
WOKWI_SERVER_URL="https://github.com/MabezDev/wokwi-server/releases/latest/download/wokwi-server-${ARCH}.zip"
WOKWI_SERVER_BIN="${CARGO_HOME}/bin/wokwi-server"
WEB_FLASH_URL="https://github.com/bjoernQ/esp-web-flash-server/releases/latest/download/web-flash-${ARCH}.zip"
Expand All @@ -547,10 +547,10 @@ elif [[ ${ARCH} == "aarch64-unknown-linux-gnu" ]]; then
GCC_ARCH="linux-arm64"
MINIFIED_LLVM="YES"
SYSTEM_PACKAGES=""
if [[ "${EXTRA_CRATES}" =~ "cargo-generate" ]]; then
GENERATE_URL="https://github.com/cargo-generate/cargo-generate/releases/latest/download/cargo-generate-${GENERATE_VERSION}-${ARCH}.tar.gz"
fi
GENERATE_BIN="${CARGO_HOME}/bin/cargo-generate"
# if [[ "${EXTRA_CRATES}" =~ "cargo-generate" ]]; then
# GENERATE_URL="https://github.com/cargo-generate/cargo-generate/releases/latest/download/cargo-generate-${GENERATE_VERSION}-${ARCH}.tar.gz"
# fi
# GENERATE_BIN="${CARGO_HOME}/bin/cargo-generate"
CARGO_ESPFLASH_URL="https://github.com/esp-rs/espflash/releases/latest/download/cargo-espflash-${ARCH}.zip"
CARGO_ESPFLASH_BIN="${CARGO_HOME}/bin/cargo-espflash"
ESPFLASH_URL="https://github.com/esp-rs/espflash/releases/latest/download/espflash-${ARCH}.zip"
Expand Down