Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build of toolchain 1.63.0.1 #135

Merged
merged 8 commits into from
Aug 22, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
submodules: true
- name: Prepare build
run: |
arch -arm64 python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --enable-extended --tools=clippy,cargo,rustfmt --dist-compression-formats='xz' --set rust.jemalloc
arch -arm64 python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --enable-extended --enable-cargo-native-static --tools=clippy,cargo,rustfmt --dist-compression-formats='xz' --set rust.jemalloc
- name: Build with x.py - dist packages - with cached LLVM
run: arch -arm64 python3 x.py dist --stage 2 || echo "silence pkg build error"
- name: Upload Release Asset
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-rust-src-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
Expand Down
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 }}"
4 changes: 2 additions & 2 deletions .github/workflows/publish-idf-rust-examples-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
release_version:
description: 'Release version - long 4 places for tag'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_patch_version:
description: 'Release patch version for generation - 3 places for tag'
required: true
default: '1.62.1'
default: '1.63.0'
rust_minor_version:
description: 'Release minor version - 2 places for tag'
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-idf-rust-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
release_version:
description: 'Release version - long 4 places for tag'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_patch_version:
description: 'Release patch version for generation - 3 places for tag'
required: true
default: '1.62.1'
default: '1.63.0'
rust_minor_version:
description: 'Release minor version - 2 places for tag'
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-idf-rust-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
toolchain-version:
description: "Version of Rust toolchain"
required: true
default: '1.62.1.0'
default: '1.63.0.1'

jobs:
esp-idf:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-installer-dispatch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ on:
release_version:
description: 'Release Version for generation'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
rust_version:
description: 'Version of esp rust to use'
required: true
default: '1.62.1'
default: '1.63.0'


# We Break this down into individual jobs to avoid disk space issues
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
toolchain_version:
description: 'Version of Rust IDF toolchain'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
target:
description: 'Target to build (e.g. xtensa-esp32-espidf)'
required: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
toolchain_version:
description: 'Version of Rust IDF toolchain'
required: true
default: '1.62.1.0'
default: '1.63.0.1'

jobs:
build-idf-rust-examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
toolchain_version:
description: 'Version of Rust IDF toolchain'
required: true
default: '1.62.1.0'
default: '1.63.0.1'

jobs:
build-idf-rust-examples:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
ARCH: ''
TARGET: win-x64
ASSET_PATH: 'build/dist/esp.zip'
ASSET_NAME: 'rust-1.62.1.0-x86_64-pc-windows-msvc.zip'
ASSET_NAME: 'rust-1.63.0.1-x86_64-pc-windows-msvc.zip'
ASSET_CONTENT_TYPE: 'application/zip'
LLVM_ROOT_OPTION: '--llvm-root=C:/llvm-project'
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
toolchain_version:
description: 'Version of Rust IDF toolchain'
required: true
default: '1.62.1.0'
default: '1.63.0.1'
esp_idf_version:
description: 'Version of ESP-IDF for the build'
required: true
Expand Down
2 changes: 1 addition & 1 deletion Install-RustToolchain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ param (
[String]
$ExportFile = '',
[String]
$ToolchainVersion = '1.62.1.0',
$ToolchainVersion = '1.63.0.1',
[String]
$ToolchainDestination = "${HOME}/.rustup/toolchains/esp",
[String]
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@ This repository contains:

## Xtensa Installation

Download installer from Release section: [https://github.com/esp-rs/rust-build/releases/tag/v1.62.1.0]
Download the installer from the [Release section](https://github.com/esp-rs/rust-build/releases).

### Download installer

#### Download installer in Bash

```bash
curl -LO https://github.com/esp-rs/rust-build/releases/download/v1.62.1.0/install-rust-toolchain.sh
curl -LO https://github.com/esp-rs/rust-build/releases/download/v1.63.0.1/install-rust-toolchain.sh
chmod a+x install-rust-toolchain.sh
```

#### Download installer in PowerShell

```powershell
Invoke-WebRequest 'https://github.com/esp-rs/rust-build/releases/download/v1.62.1.0/Install-RustToolchain.ps1' -OutFile .\Install-RustToolchain.ps1
Invoke-WebRequest 'https://github.com/esp-rs/rust-build/releases/download/v1.63.0.1/Install-RustToolchain.ps1' -OutFile .\Install-RustToolchain.ps1
```

### Linux and macOS
Expand Down Expand Up @@ -83,7 +83,7 @@ Export variables are displayed at the end of the script.
Installation of different version of the toolchain:

```
./install-rust-toolchain.sh --toolchain-version 1.62.1.0 --export-file export-esp-rust.sh
./install-rust-toolchain.sh --toolchain-version 1.63.0.1 --export-file export-esp-rust.sh
source export-esp-rust.sh
```

Expand All @@ -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 All @@ -125,8 +126,8 @@ Activate ESP-IDF PowerShell and enter following command:
```powershell
git clone https://github.com/esp-rs/rust-build.git
cd rust-build
./Install-RustToolchain.ps1 -DefaultHost x86_64-pc-windows-gnu -ExportFile Export-EspRust.ps1
source Export-EspRust.ps1
./Install-RustToolchain.ps1 -DefaultHost x86_64-pc-windows-gnu -ExportFile Export-EspRust.ps1
. ./Export-EspRust.ps1
```

### Windows x86_64 MSVC
Expand Down Expand Up @@ -161,8 +162,8 @@ Export variables are displayed at the end of the output from the script.
Installation of different versions of toolchain:

```sh
./Install-RustToolchain.ps1 -ToolchainVersion 1.62.1.0 -ExportFile Export-EspRust.ps1
source ./Export-EspRust.ps1
./Install-RustToolchain.ps1 -ToolchainVersion 1.63.0.1 -ExportFile Export-EspRust.ps1
. ./Export-EspRust.ps1
```

## RISC-V Installation
Expand Down
2 changes: 1 addition & 1 deletion Test-RustToolchain.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param (
[ValidateSet("x86_64-pc-windows-msvc", "x86_64-pc-windows-gnu")]
$DefaultHost = "x86_64-pc-windows-msvc",
[String]
$ToolchainVersion = '1.62.1.0',
$ToolchainVersion = '1.63.0.1',
[String]
[ValidateSet("xtensa-esp32-espidf", "xtensa-esp32s2-espidf", "xtensa-esp32s3-espidf", "riscv32imc-esp-espidf")]
$Target = "xtensa-esp32-espidf",
Expand Down
2 changes: 1 addition & 1 deletion idf-rust.Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ENV LANG=C.UTF-8
ARG CONTAINER_USER=esp
ARG CONTAINER_GROUP=esp
ARG NIGHTLY_TOOLCHAIN_VERSION=nightly
ARG XTENSA_TOOLCHAIN_VERSION=1.62.1.0
ARG XTENSA_TOOLCHAIN_VERSION=1.63.0.1
ARG ESP_IDF_VERSION=""
ARG ESP_BOARD=esp32,esp32s2,esp32s3
ARG INSTALL_RUST_TOOLCHAIN=install-rust-toolchain.sh
Expand Down
18 changes: 9 additions & 9 deletions install-rust-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu
#set -v

# Default values
TOOLCHAIN_VERSION="1.62.1.0"
TOOLCHAIN_VERSION="1.63.0.1"
RUSTUP_HOME="${RUSTUP_HOME:-${HOME}/.rustup}"
CARGO_HOME="${CARGO_HOME:-${HOME}/.cargo}"
TOOLCHAIN_DESTINATION_DIR="${RUSTUP_HOME}/toolchains/esp"
Expand Down 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
2 changes: 1 addition & 1 deletion support/rust-build/Repackage-RustRelease.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ param (
$ErrorActionPreference = "Stop"

$RustVersion="nightly"
$ReleaseVersion="1.62.1.0"
$ReleaseVersion="1.63.0.1"

if (Test-Path -Path esp -PathType Container) {
Remove-Item -Recurse -Force -Path esp
Expand Down
2 changes: 1 addition & 1 deletion support/rust-build/aarch64-unknown-linux-gnu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ set -e

git clone --recursive --depth 1 --shallow-submodules https://github.com/esp-rs/rust.git
cd rust
python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --enable-extended --tools=clippy,cargo,rustfmt --dist-compression-formats='xz'
python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --enable-extended --enable-cargo-native-static --tools=clippy,cargo,rustfmt --dist-compression-formats='xz'
python3 x.py dist --stage 2

Loading