Xtensa Rust | x86_64-pc-windows-msvc #25
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Xtensa Rust | x86_64-pc-windows-msvc | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: "Xtensa Rust release version to build" | |
required: true | |
default: '1.79.0.0' | |
release_tag: | |
description: "Release tag where artifacts will be stored (e.g. v1.79.0.0, untagged-00000)" | |
required: true | |
default: "v1.79.0.0" | |
jobs: | |
get_release: | |
name: Get release | |
runs-on: ubuntu-latest | |
outputs: | |
upload_url: ${{ steps.get_upload_url.outputs.url }} | |
steps: | |
- uses: octokit/[email protected] | |
id: get_release | |
with: | |
route: GET /repos/esp-rs/rust-build/releases/tags/${{ github.event.inputs.release_tag }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: get upload url | |
id: get_upload_url | |
run: | | |
url=$(echo "$response" | jq -r '.upload_url') | |
echo "url=$url" >> $GITHUB_OUTPUT | |
env: | |
response: ${{ steps.get_release.outputs.data }} | |
build-xtensa-rust: | |
name: Build Xtensa Rust | |
needs: get_release | |
runs-on: [self-hosted, Windows] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout repository - esp-rs/rust | |
uses: actions/checkout@v4 | |
with: | |
path: rust | |
repository: esp-rs/rust | |
ref: esp-${{ github.event.inputs.release_version }} | |
submodules: true | |
- name: Unmount local drive | |
id: unount_path_before | |
continue-on-error: true | |
run: subst "R:" /D | |
- name: Map local long path to new drive | |
id: map_path | |
shell: powershell | |
run: subst "R:" "$env:GITHUB_WORKSPACE\rust" | |
- name: Prepare build | |
working-directory: "R:" | |
shell: powershell | |
run: | | |
python src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --release-description="${{ github.event.inputs.release_version }}" --enable-extended --tools=clippy,cargo,rustfmt,rust-analyzer-proc-macro-srv --dist-compression-formats='xz' | |
- name: Build with x.py - dist packages | |
working-directory: "R:" | |
continue-on-error: true | |
shell: powershell | |
run: | | |
python x.py dist --stage 2 | |
- name: Repackage binary | |
shell: powershell | |
working-directory: "R:/build/dist" | |
run: | | |
&"$env:GITHUB_WORKSPACE/support/rust-build/Repackage-RustRelease.ps1" -DefaultHost x86_64-pc-windows-msvc | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.get_release.outputs.upload_url }} | |
asset_path: rust/build/dist/rust-${{ github.event.inputs.release_version }}-x86_64-pc-windows-msvc.zip | |
asset_name: rust-${{ github.event.inputs.release_version }}-x86_64-pc-windows-msvc.zip | |
asset_content_type: application/x-tar | |
- name: Unmount local drive | |
id: unount_path | |
continue-on-error: true | |
run: subst "R:" /D |