mirror of
https://github.com/wez/wezterm.git
synced 2024-09-19 02:37:51 +03:00
ci: put fmt check into separate workflow
This commit is contained in:
parent
4b457da62f
commit
11567c2097
50
.github/workflows/fmt.yml
vendored
Normal file
50
.github/workflows/fmt.yml
vendored
Normal 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
|
||||
|
||||
|
3
.github/workflows/gen_centos8.yml
vendored
3
.github/workflows/gen_centos8.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_debian10.3.yml
vendored
3
.github/workflows/gen_debian10.3.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_debian11.yml
vendored
3
.github/workflows/gen_debian11.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_debian9.12.yml
vendored
3
.github/workflows/gen_debian9.12.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_fedora33.yml
vendored
3
.github/workflows/gen_fedora33.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_fedora34.yml
vendored
3
.github/workflows/gen_fedora34.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_fedora35.yml
vendored
3
.github/workflows/gen_fedora35.yml
vendored
@ -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"
|
||||
|
5
.github/workflows/gen_macos.yml
vendored
5
.github/workflows/gen_macos.yml
vendored
@ -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: |
|
||||
|
3
.github/workflows/gen_ubuntu18.yml
vendored
3
.github/workflows/gen_ubuntu18.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_ubuntu20.04.yml
vendored
3
.github/workflows/gen_ubuntu20.04.yml
vendored
@ -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"
|
||||
|
3
.github/workflows/gen_windows.yml
vendored
3
.github/workflows/gen_windows.yml
vendored
@ -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: |
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user