Xtensa Rust | aarch64-apple-darwin #28
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 | aarch64-apple-darwin | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: "Xtensa Rust release version to build" | |
required: true | |
default: '1.82.0.2' | |
release_tag: | |
description: "Release tag where artifacts will be stored (e.g. v1.82.0.2, untagged-00000)" | |
required: true | |
default: "v1.82.0.2" | |
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: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-m1-self-hosted] | |
include: | |
- os: macos-m1-self-hosted | |
ASSET_PATH: "build/dist/rust-nightly-aarch64-apple-darwin.tar.xz" | |
ASSET_NAME: "rust-${{ github.event.inputs.release_version }}-aarch64-apple-darwin.tar.xz" | |
ASSET_CONTENT_TYPE: "application/x-tar" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
repository: esp-rs/rust | |
ref: esp-${{ github.event.inputs.release_version }} | |
submodules: true | |
- name: Prepare build | |
run: | | |
arch -arm64 python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --release-description="${{ github.event.inputs.release_version }}" --enable-extended --enable-cargo-native-static --tools=clippy,cargo,rustfmt,rust-analyzer-proc-macro-srv,src --dist-compression-formats='xz' --set rust.jemalloc --enable-lld | |
- 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 | |
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: ${{ matrix.ASSET_PATH }} | |
asset_name: ${{ matrix.ASSET_NAME }} | |
asset_content_type: ${{ matrix.ASSET_CONTENT_TYPE }} |