Skip to content

Commit ca71699

Browse files
committed
cicd: Format workflows
1 parent a170b6c commit ca71699

File tree

2 files changed

+42
-19
lines changed

2 files changed

+42
-19
lines changed

.github/workflows/check.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
1-
on: [push, pull_request]
21
name: Run checks
32

3+
on:
4+
- push
5+
- pull_request
6+
47
jobs:
58
check:
69
runs-on: ubuntu-latest
710
steps:
8-
- uses: actions/checkout@v3
11+
- name: Checkout repository
12+
uses: actions/checkout@v3
13+
914
- name: Install packages
10-
run: sudo apt-get update && sudo apt-get install libgtk-3-dev gcc-mingw-w64
15+
run: |
16+
sudo apt update
17+
sudo apt install gcc-mingw-w64 libgtk-3-dev
1118
12-
- uses: actions-rs/toolchain@v1
19+
- name: Install Rust
20+
uses: actions-rs/toolchain@v1
1321
with:
1422
toolchain: nightly-2023-08-18
1523
components: clippy, rustfmt
1624
target: x86_64-pc-windows-gnu
1725
override: true
1826

19-
- uses: actions-rs/clippy-check@v1
20-
name: Check clippy
27+
- name: Lint code
28+
uses: actions-rs/clippy-check@v1
2129
with:
2230
token: ${{ secrets.GITHUB_TOKEN }}
2331
args: --all-features --all-targets -- -D warnings
2432

25-
- name: Check rustfmt
33+
- name: Format code
2634
run: cargo fmt -- --check

.github/workflows/release.yml

+27-12
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ jobs:
1616
env:
1717
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1818
steps:
19-
- uses: actions/checkout@v3
19+
- name: Checkout repository
20+
uses: actions/checkout@v3
21+
2022
- name: Install Rust
2123
run: rustup install nightly-2023-08-18 --no-self-update && rustup default nightly-2023-08-18
24+
2225
- name: Install cargo-dist
2326
run: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
24-
- id: create-release
27+
28+
- name: Create Release
29+
id: create-release
2530
run: |
2631
cargo dist plan --tag=${{ github.ref_name }} --output-format=json > dist-manifest.json
2732
echo "dist plan ran successfully"
@@ -51,35 +56,45 @@ jobs:
5156
matrix:
5257
# For these target platforms
5358
include:
54-
- os: ubuntu-20.04
55-
dist-args: --artifacts=local --target=x86_64-unknown-linux-gnu
56-
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
57-
- os: windows-2019
58-
dist-args: --artifacts=local --target=x86_64-pc-windows-msvc
59-
install-dist: irm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.ps1 | iex
59+
- os: ubuntu-20.04
60+
dist-args: --artifacts=local --target=x86_64-unknown-linux-gnu
61+
install-dist: curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.sh | sh
62+
- os: windows-2019
63+
dist-args: --artifacts=local --target=x86_64-pc-windows-msvc
64+
install-dist: irm https://github.com/axodotdev/cargo-dist/releases/download/v0.0.7/cargo-dist-installer.ps1 | iex
6065

6166
runs-on: ${{ matrix.os }}
6267
env:
6368
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6469
steps:
65-
- uses: actions/checkout@v3
70+
- name: Checkout repository
71+
uses: actions/checkout@v3
72+
6673
- name: Install Rust
6774
run: rustup install nightly-2023-08-18 --no-self-update && rustup default nightly-2023-08-18
68-
- name: Install x86_64-pc-windows-gnu target
75+
76+
- name: Add x86_64-pc-windows-gnu target
6977
if: runner.os == 'Linux' || runner.os == 'macOS'
7078
run: rustup target add x86_64-pc-windows-gnu
71-
- name: Cache Dependencies
79+
80+
- name: Cache dependencies
7281
uses: Swatinem/rust-cache@v2
82+
7383
- name: Install cargo-dist
7484
run: ${{ matrix.install-dist }}
85+
7586
- name: Install packages (Linux)
7687
if: runner.os == 'Linux'
77-
run: sudo apt-get update && sudo apt-get install libgtk-3-dev gcc-mingw-w64
88+
run: |
89+
sudo apt update
90+
sudo apt install gcc-mingw-w64 libgtk-3-dev
91+
7892
- name: Install packages (MacOS)
7993
if: runner.os == 'macOS'
8094
run: |
8195
NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
8296
brew install mingw-w64
97+
8398
- name: Run cargo-dist
8499
# This logic is a bit janky because it's trying to be a polyglot between
85100
# powershell and bash since this will run on windows, macos, and linux!

0 commit comments

Comments
 (0)