-
-
Notifications
You must be signed in to change notification settings - Fork 29
53 lines (45 loc) · 1.49 KB
/
autofix.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: autofix.ci
on:
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
rust_clippy: "1.80" # MSRV
jobs:
protobuf:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: brew install swift-protobuf
- run: cargo install protoc-gen-prost
- run: protoc --proto_path=./src/ipc/ mitmproxy_ipc.proto
--prost_out=./src/ipc/
--swift_out=./mitmproxy-macos/redirector/ipc
- run: cargo fmt --all
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
rustfmt:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
- os: macos-latest
- os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install ${{ env.rust_clippy }} --profile minimal --component rustfmt --component clippy
- run: rustup default ${{ env.rust_clippy }}
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
timeout-minutes: 2
continue-on-error: true
# PyO3 wants recent Python on Windows.
- uses: actions/setup-python@v5
with:
python-version-file: .github/python-version.txt
- run: cargo clippy --fix --allow-dirty --workspace
- run: cargo fmt --all
- run: git checkout src/ipc/mitmproxy_ipc.rs
- uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a