Skip to content

Commit 506c3a0

Browse files
ci: 🎨 Format CI files (#143)
1 parent 8e9c830 commit 506c3a0

33 files changed

+342
-365
lines changed

.github/actions/build/build-rust-std/action.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Build Ruststd'
2-
description: 'Build the rust std Library'
1+
name: "Build Ruststd"
2+
description: "Build the rust std Library"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
# Run the Windows Build using powershell
98

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

29-
3028
# Run Linux builds using bash
3129

3230
- name: Prepare build
@@ -54,7 +52,6 @@ runs:
5452
shell: bash
5553
run: python3 x.py dist --stage 2 library/std
5654

57-
5855
# Save the result
5956

6057
- name: Save Artifact - Standard Library

.github/actions/build/build-rustc/action.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Build Rustc'
2-
description: 'Build the rustc toolchain'
1+
name: "Build Rustc"
2+
description: "Build the rustc toolchain"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
# Run the Windows Build using powershell
98

109
- name: Prepare build
@@ -26,7 +25,6 @@ runs:
2625
shell: pwsh
2726
run: python3 x.py dist
2827

29-
3028
# Run Linux builds using bash
3129

3230
- name: Prepare build
@@ -54,7 +52,6 @@ runs:
5452
shell: bash
5553
run: python3 x.py dist --stage 2 src/librustc
5654

57-
5855
# Save the result
5956

6057
- name: Save Artifact - Rustc

.github/actions/build/build-src/action.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Build Src'
2-
description: 'Build the rustc src'
1+
name: "Build Src"
2+
description: "Build the rustc src"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
# Run the Windows Build using powershell
98

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

22-
2321
# Run Linux builds using bash
2422

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

43-
4441
# Save the result
4542

4643
- name: Save Artifact - Src

.github/actions/build/build-tools/action.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Build Tools'
2-
description: 'Build the rustc tools'
1+
name: "Build Tools"
2+
description: "Build the rustc tools"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
# Run the Windows Build using powershell
98

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

31-
3230
# Run Linux builds using bash
3331

3432
- name: Prepare build
@@ -57,7 +55,6 @@ runs:
5755
shell: bash
5856
run: python3 x.py dist --stage 2 clippy rustfmt cargo
5957

60-
6158
# Save the result
6259

6360
# We only want to do cargo for windows builds

.github/actions/tools/setup-libudev/action.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Setup libudev-dev'
2-
description: 'Install libudev-dev'
1+
name: "Setup libudev-dev"
2+
description: "Install libudev-dev"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Install libudev-dev
98
if: startsWith(matrix.os, 'ubuntu')
109
shell: bash
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
name: 'Setup Ninja'
2-
description: 'Setup the Ninja Build System'
1+
name: "Setup Ninja"
2+
description: "Setup the Ninja Build System"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Setup Ninja
98
uses: seanmiddleditch/gha-setup-ninja@master
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
name: 'Setup Python'
2-
description: 'Setup the Python Install'
1+
name: "Setup Python"
2+
description: "Setup the Python Install"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Set up Python
98
uses: actions/setup-python@v2
109
with:
11-
python-version: '3.8'
10+
python-version: "3.8"

.github/actions/util/checkout-esp-rust/action.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Checkout Source'
2-
description: 'Downloads the Source for esp-rs/rust'
1+
name: "Checkout Source"
2+
description: "Downloads the Source for esp-rs/rust"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Checkout repository
98
uses: actions/checkout@v2
109
with:

.github/actions/util/create-archive/action.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Create Archive'
2-
description: 'Create a release archive for upload'
1+
name: "Create Archive"
2+
description: "Create a release archive for upload"
33

44
# To avoid disk space issues under github workflow
55
# we need to split the build into multiple jobs
@@ -14,7 +14,6 @@ description: 'Create a release archive for upload'
1414
runs:
1515
using: "composite"
1616
steps:
17-
1817
# Read in the built files
1918
- uses: ./rust-build/.github/actions/util/read-artifacts
2019

@@ -53,7 +52,6 @@ runs:
5352
# Build the final zip
5453
7z a ${{ env.asset_name }} esp/
5554
56-
5755
# Create Archive - Linux tar.xz
5856
- name: Create Archive - Linux (tar.xz)
5957
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')

.github/actions/util/read-artifacts/action.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: 'Read Cache'
2-
description: 'Reads in all of the built artifact files prior to create-archive'
1+
name: "Read Cache"
2+
description: "Reads in all of the built artifact files prior to create-archive"
33

44
runs:
55
using: "composite"
66
steps:
7-
87
- name: Read Artifact - Rustc
98
uses: actions/download-artifact@v2
109
with:

.github/actions/util/setup-envs/action.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Setup Env Variables - Rust Build'
2-
description: 'Setup Env Variables - Rust Build'
1+
name: "Setup Env Variables - Rust Build"
2+
description: "Setup Env Variables - Rust Build"
33

44
# used for rust build
55

@@ -12,7 +12,6 @@ inputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
1615
- name: Setup Env Variables - Common
1716
shell: bash
1817
run: |
@@ -47,7 +46,6 @@ runs:
4746
# asset name for release
4847
echo "asset_name=rust-${{ github.event.inputs.release_version }}-${{ matrix.target_name }}.zip" >> $GITHUB_ENV
4948
50-
5149
- name: Setup Env Variables - Unix
5250
if: startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu')
5351
shell: bash

.github/actions/util/symlink-working-dir/action.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
name: 'SymLink the working directory'
2-
description: 'SymLink the working directory'
1+
name: "SymLink the working directory"
2+
description: "SymLink the working directory"
33

44
runs:
55
using: "composite"
66
steps:
7-
8-
# Windows typically can have long path issues
9-
# To get around this we create a link
10-
# from D:/a/rust-build/rust-build/rust to D:/rust to shorten the build path
7+
# Windows typically can have long path issues
8+
# To get around this we create a link
9+
# from D:/a/rust-build/rust-build/rust to D:/rust to shorten the build path
1110

1211
- name: Symlink working directory
1312
shell: pwsh
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: 'Upload to github releases'
2-
description: 'Upload the final built archive to github'
1+
name: "Upload to github releases"
2+
description: "Upload the final built archive to github"
33

44
# In addition to uploading the file to the release
55
# * This also turns a tag into a release if one doesn't exist already
@@ -11,11 +11,8 @@ description: 'Upload the final built archive to github'
1111
runs:
1212
using: "composite"
1313
steps:
14-
1514
- name: Upload Release Asset
1615
uses: softprops/action-gh-release@v1
1716
with:
18-
tag_name:
19-
v${{ env.release_version }}
20-
files:
21-
${{ env.asset_name }}
17+
tag_name: v${{ env.release_version }}
18+
files: ${{ env.asset_name }}
Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
21
name: build-rust-macos-m1-dispatch
32

43
on:
54
workflow_dispatch:
65
inputs:
76
upload_artifacts:
8-
description: 'Upload final artifacts to Release?'
7+
description: "Upload final artifacts to Release?"
98
required: true
10-
default: 'yes'
9+
default: "yes"
1110
rust_build_branch:
12-
description: 'Branch of rust-build to use'
11+
description: "Branch of rust-build to use"
1312
required: true
14-
default: 'main'
13+
default: "main"
1514
release_version:
16-
description: 'Release Version for generation'
15+
description: "Release Version for generation"
1716
required: true
1817
default: '1.64.0.0'
1918
rust_version:
20-
description: 'Version of esp rust to use'
19+
description: "Version of esp rust to use"
2120
required: true
22-
default: 'nightly'
21+
default: "nightly"
2322
rust_target:
24-
description: 'Target triple'
23+
description: "Target triple"
2524
required: true
26-
default: 'aarch64-apple-darwin'
25+
default: "aarch64-apple-darwin"
2726

2827
jobs:
2928
get_release:
@@ -33,21 +32,21 @@ jobs:
3332
outputs:
3433
upload_url: ${{ steps.get_upload_url.outputs.url }}
3534
steps:
36-
- uses: octokit/[email protected]
37-
id: get_release
38-
with:
39-
route: GET /repos/{owner}/{repo}/releases/tags/v${{ github.event.inputs.release_version }}
40-
owner: esp-rs
41-
repo: rust-build
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
- name: get upload url
45-
id: get_upload_url
46-
run: |
47-
url=$(echo "$response" | jq -r '.upload_url')
48-
echo "::set-output name=url::$url"
49-
env:
50-
response: ${{ steps.get_release.outputs.data }}
35+
- uses: octokit/[email protected]
36+
id: get_release
37+
with:
38+
route: GET /repos/{owner}/{repo}/releases/tags/v${{ github.event.inputs.release_version }}
39+
owner: esp-rs
40+
repo: rust-build
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- name: get upload url
44+
id: get_upload_url
45+
run: |
46+
url=$(echo "$response" | jq -r '.upload_url')
47+
echo "::set-output name=url::$url"
48+
env:
49+
response: ${{ steps.get_release.outputs.data }}
5150

5251
build-idf-rust:
5352
name: Build IDF Rust for ${{ matrix.os }}
@@ -56,12 +55,12 @@ jobs:
5655
runs-on: ${{ matrix.os }}
5756
strategy:
5857
matrix:
59-
os: [ macos-m1-self-hosted ]
58+
os: [macos-m1-self-hosted]
6059
include:
61-
- os: macos-m1-self-hosted
62-
ASSET_PATH: 'build/dist/rust-${{ github.event.inputs.rust_version }}-${{ github.event.inputs.rust_target }}.tar.xz'
63-
ASSET_NAME: 'rust-${{ github.event.inputs.release_version }}-${{ github.event.inputs.rust_target }}.tar.xz'
64-
ASSET_CONTENT_TYPE: 'application/x-tar'
60+
- os: macos-m1-self-hosted
61+
ASSET_PATH: "build/dist/rust-${{ github.event.inputs.rust_version }}-${{ github.event.inputs.rust_target }}.tar.xz"
62+
ASSET_NAME: "rust-${{ github.event.inputs.release_version }}-${{ github.event.inputs.rust_target }}.tar.xz"
63+
ASSET_CONTENT_TYPE: "application/x-tar"
6564
steps:
6665
- name: Checkout repository
6766
uses: actions/checkout@v2
@@ -85,4 +84,3 @@ jobs:
8584
asset_path: ${{ matrix.ASSET_PATH }}
8685
asset_name: ${{ matrix.ASSET_NAME }}
8786
asset_content_type: ${{ matrix.ASSET_CONTENT_TYPE }}
88-

0 commit comments

Comments
 (0)