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
7 changes: 2 additions & 5 deletions .github/actions/build/build-rust-std/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Build Ruststd'
description: 'Build the rust std Library'
name: "Build Ruststd"
description: "Build the rust std Library"

runs:
using: "composite"
steps:

# Run the Windows Build using powershell

- name: Prepare build
Expand All @@ -26,7 +25,6 @@ runs:
shell: pwsh
run: python3 x.py dist --stage 2 library/std


# Run Linux builds using bash

- name: Prepare build
Expand Down Expand Up @@ -54,7 +52,6 @@ runs:
shell: bash
run: python3 x.py dist --stage 2 library/std


# Save the result

- name: Save Artifact - Standard Library
Expand Down
7 changes: 2 additions & 5 deletions .github/actions/build/build-rustc/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Build Rustc'
description: 'Build the rustc toolchain'
name: "Build Rustc"
description: "Build the rustc toolchain"

runs:
using: "composite"
steps:

# Run the Windows Build using powershell

- name: Prepare build
Expand All @@ -26,7 +25,6 @@ runs:
shell: pwsh
run: python3 x.py dist


# Run Linux builds using bash

- name: Prepare build
Expand Down Expand Up @@ -54,7 +52,6 @@ runs:
shell: bash
run: python3 x.py dist --stage 2 src/librustc


# Save the result

- name: Save Artifact - Rustc
Expand Down
7 changes: 2 additions & 5 deletions .github/actions/build/build-src/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Build Src'
description: 'Build the rustc src'
name: "Build Src"
description: "Build the rustc src"

runs:
using: "composite"
steps:

# Run the Windows Build using powershell

- name: Prepare build - Windows
Expand All @@ -19,7 +18,6 @@ runs:
shell: pwsh
run: python3 x.py dist dist rust-src


# Run Linux builds using bash

- name: Prepare build - macOS
Expand All @@ -40,7 +38,6 @@ runs:
shell: bash
run: python3 x.py dist rust-src


# Save the result

- name: Save Artifact - Src
Expand Down
7 changes: 2 additions & 5 deletions .github/actions/build/build-tools/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Build Tools'
description: 'Build the rustc tools'
name: "Build Tools"
description: "Build the rustc tools"

runs:
using: "composite"
steps:

# Run the Windows Build using powershell

- name: Prepare build
Expand All @@ -28,7 +27,6 @@ runs:
shell: pwsh
run: python3 x.py dist --stage 2 clippy rustfmt cargo


# Run Linux builds using bash

- name: Prepare build
Expand Down Expand Up @@ -57,7 +55,6 @@ runs:
shell: bash
run: python3 x.py dist --stage 2 clippy rustfmt cargo


# Save the result

# We only want to do cargo for windows builds
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/tools/setup-libudev/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Setup libudev-dev'
description: 'Install libudev-dev'
name: "Setup libudev-dev"
description: "Install libudev-dev"

runs:
using: "composite"
steps:

- name: Install libudev-dev
if: startsWith(matrix.os, 'ubuntu')
shell: bash
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/tools/setup-ninja/action.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: 'Setup Ninja'
description: 'Setup the Ninja Build System'
name: "Setup Ninja"
description: "Setup the Ninja Build System"

runs:
using: "composite"
steps:

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
7 changes: 3 additions & 4 deletions .github/actions/tools/setup-python/action.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
name: 'Setup Python'
description: 'Setup the Python Install'
name: "Setup Python"
description: "Setup the Python Install"

runs:
using: "composite"
steps:

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: "3.8"
5 changes: 2 additions & 3 deletions .github/actions/util/checkout-esp-rust/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Checkout Source'
description: 'Downloads the Source for esp-rs/rust'
name: "Checkout Source"
description: "Downloads the Source for esp-rs/rust"

runs:
using: "composite"
steps:

- name: Checkout repository
uses: actions/checkout@v2
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/util/create-archive/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Create Archive'
description: 'Create a release archive for upload'
name: "Create Archive"
description: "Create a release archive for upload"

# To avoid disk space issues under github workflow
# we need to split the build into multiple jobs
Expand All @@ -14,7 +14,6 @@ description: 'Create a release archive for upload'
runs:
using: "composite"
steps:

# Read in the built files
- uses: ./rust-build/.github/actions/util/read-artifacts

Expand Down Expand Up @@ -53,7 +52,6 @@ runs:
# Build the final zip
7z a ${{ env.asset_name }} esp/


# Create Archive - Linux tar.xz
- name: Create Archive - Linux (tar.xz)
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
Expand Down
5 changes: 2 additions & 3 deletions .github/actions/util/read-artifacts/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: 'Read Cache'
description: 'Reads in all of the built artifact files prior to create-archive'
name: "Read Cache"
description: "Reads in all of the built artifact files prior to create-archive"

runs:
using: "composite"
steps:

- name: Read Artifact - Rustc
uses: actions/download-artifact@v2
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/util/setup-envs/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Setup Env Variables - Rust Build'
description: 'Setup Env Variables - Rust Build'
name: "Setup Env Variables - Rust Build"
description: "Setup Env Variables - Rust Build"

# used for rust build

Expand All @@ -12,7 +12,6 @@ inputs:
runs:
using: "composite"
steps:

- name: Setup Env Variables - Common
shell: bash
run: |
Expand Down Expand Up @@ -47,7 +46,6 @@ runs:
# asset name for release
echo "asset_name=rust-${{ github.event.inputs.release_version }}-${{ matrix.target_name }}.zip" >> $GITHUB_ENV


- name: Setup Env Variables - Unix
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
shell: bash
Expand Down
11 changes: 5 additions & 6 deletions .github/actions/util/symlink-working-dir/action.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: 'SymLink the working directory'
description: 'SymLink the working directory'
name: "SymLink the working directory"
description: "SymLink the working directory"

runs:
using: "composite"
steps:

# Windows typically can have long path issues
# To get around this we create a link
# from D:/a/rust-build/rust-build/rust to D:/rust to shorten the build path
# Windows typically can have long path issues
# To get around this we create a link
# from D:/a/rust-build/rust-build/rust to D:/rust to shorten the build path

- name: Symlink working directory
shell: pwsh
Expand Down
11 changes: 4 additions & 7 deletions .github/actions/util/upload/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Upload to github releases'
description: 'Upload the final built archive to github'
name: "Upload to github releases"
description: "Upload the final built archive to github"

# In addition to uploading the file to the release
# * This also turns a tag into a release if one doesn't exist already
Expand All @@ -11,11 +11,8 @@ description: 'Upload the final built archive to github'
runs:
using: "composite"
steps:

- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
tag_name:
v${{ env.release_version }}
files:
${{ env.asset_name }}
tag_name: v${{ env.release_version }}
files: ${{ env.asset_name }}
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@

name: build-rust-macos-m1-dispatch

on:
workflow_dispatch:
inputs:
upload_artifacts:
description: 'Upload final artifacts to Release?'
description: "Upload final artifacts to Release?"
required: true
default: 'yes'
default: "yes"
rust_build_branch:
description: 'Branch of rust-build to use'
description: "Branch of rust-build to use"
required: true
default: 'main'
default: "main"
release_version:
description: 'Release Version for generation'
description: "Release Version for generation"
required: true
default: '1.63.0.2'
default: '1.64.0.0'
rust_version:
description: 'Version of esp rust to use'
description: "Version of esp rust to use"
required: true
default: 'nightly'
default: "nightly"
rust_target:
description: 'Target triple'
description: "Target triple"
required: true
default: 'aarch64-apple-darwin'
default: "aarch64-apple-darwin"

jobs:
get_release:
Expand All @@ -33,21 +32,21 @@ jobs:
outputs:
upload_url: ${{ steps.get_upload_url.outputs.url }}
steps:
- uses: octokit/[email protected]
id: get_release
with:
route: GET /repos/{owner}/{repo}/releases/tags/v${{ github.event.inputs.release_version }}
owner: esp-rs
repo: rust-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: get upload url
id: get_upload_url
run: |
url=$(echo "$response" | jq -r '.upload_url')
echo "::set-output name=url::$url"
env:
response: ${{ steps.get_release.outputs.data }}
- uses: octokit/[email protected]
id: get_release
with:
route: GET /repos/{owner}/{repo}/releases/tags/v${{ github.event.inputs.release_version }}
owner: esp-rs
repo: rust-build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: get upload url
id: get_upload_url
run: |
url=$(echo "$response" | jq -r '.upload_url')
echo "::set-output name=url::$url"
env:
response: ${{ steps.get_release.outputs.data }}

build-idf-rust:
name: Build IDF Rust for ${{ matrix.os }}
Expand All @@ -56,12 +55,12 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-m1-self-hosted ]
os: [macos-m1-self-hosted]
include:
- os: macos-m1-self-hosted
ASSET_PATH: 'build/dist/rust-${{ github.event.inputs.rust_version }}-${{ github.event.inputs.rust_target }}.tar.xz'
ASSET_NAME: 'rust-${{ github.event.inputs.release_version }}-${{ github.event.inputs.rust_target }}.tar.xz'
ASSET_CONTENT_TYPE: 'application/x-tar'
- os: macos-m1-self-hosted
ASSET_PATH: "build/dist/rust-${{ github.event.inputs.rust_version }}-${{ github.event.inputs.rust_target }}.tar.xz"
ASSET_NAME: "rust-${{ github.event.inputs.release_version }}-${{ github.event.inputs.rust_target }}.tar.xz"
ASSET_CONTENT_TYPE: "application/x-tar"
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -85,4 +84,3 @@ jobs:
asset_path: ${{ matrix.ASSET_PATH }}
asset_name: ${{ matrix.ASSET_NAME }}
asset_content_type: ${{ matrix.ASSET_CONTENT_TYPE }}

Loading