1
1
mirror of https://github.com/wez/wezterm.git synced 2024-09-17 17:57:28 +03:00

ci: put fmt check into separate workflow

This commit is contained in:
Wez Furlong 2022-01-16 19:07:47 -07:00
parent 4b457da62f
commit 11567c2097
13 changed files with 50 additions and 39 deletions

50
.github/workflows/fmt.yml vendored Normal file
View File

@ -0,0 +1,50 @@
name: fmt
on:
pull_request:
branches:
- main
paths-ignore:
- ".cirrus.yml"
- "docs/*"
- "ci/build-docs.sh"
- "ci/generate-docs.py"
- "ci/subst-release-info.py"
- ".github/workflows/pages.yml"
- ".github/workflows/verify-pages.yml"
- ".github/ISSUE_TEMPLATE/*"
- "**/*.md"
push:
branches:
- main
paths-ignore:
- ".cirrus.yml"
- "docs/**"
- "ci/build-docs.sh"
- "ci/generate-docs.py"
- "ci/subst-release-info.py"
- ".github/workflows/pages.yml"
- ".github/workflows/verify-pages.yml"
- ".github/ISSUE_TEMPLATE/*"
- "**/*.md"
jobs:
check-code-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: "Install Rust"
uses: actions-rs/toolchain@v1
with:
profile: "minimal"
toolchain: "stable"
override: true
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
- name: Build
run: |
source $HOME/.cargo/env
cargo fmt --all -- --check

View File

@ -62,9 +62,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -65,9 +65,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -65,9 +65,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -79,9 +79,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -59,9 +59,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -59,9 +59,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -59,9 +59,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -43,11 +43,6 @@ jobs:
run: |
export MACOSX_DEPLOYMENT_TARGET=10.9
env PATH=$PATH ./get-deps
- name: "Check formatting"
shell: bash
run: |
export MACOSX_DEPLOYMENT_TARGET=10.9
cargo fmt --all -- --check
- name: "Build (Release mode Intel)"
shell: bash
run: |

View File

@ -50,9 +50,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "sudo -n env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -65,9 +65,6 @@ jobs:
- name: "Install System Deps"
shell: bash
run: "env PATH=$PATH ./get-deps"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: bash
run: "cargo build --all --release"

View File

@ -42,9 +42,6 @@ jobs:
~/.cargo/git
target
key: "windows-x86_64-pc-windows-msvc-2-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-cargo"
- name: "Check formatting"
shell: bash
run: "cargo fmt --all -- --check"
- name: "Build (Release mode)"
shell: cmd
run: |

View File

@ -277,9 +277,6 @@ ln -s /usr/local/git/bin/git /usr/local/bin/git""",
RunStep(name="Install System Deps", run=f"{sudo}env PATH=$PATH ./get-deps")
]
def check_formatting(self):
return [RunStep(name="Check formatting", run="cargo fmt --all -- --check")]
def build_all_release(self):
if "win" in self.name:
return [
@ -566,7 +563,6 @@ cargo build --all --release""",
def pull_request(self):
steps = self.prep_environment()
steps += self.check_formatting()
steps += self.build_all_release()
steps += self.test_all_release()
steps += self.package()