-
Notifications
You must be signed in to change notification settings - Fork 1
72 lines (59 loc) · 1.68 KB
/
ci.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: ci
on:
push:
branches:
- master
pull_request:
env:
MOZC_SHA: ad0e97b8b8dcfd4c841a02c5d6a043fb5e741405
jobs:
lint:
runs-on: ubuntu-latest
outputs:
MOZC_SHA: ${{ env.MOZC_SHA }}
message: ${{ steps.commit-message.outputs.message }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: pip install ruff pyright
- name: Lint
run: |
ruff check scripts
pyright scripts/*.py
- name: Pass commit message
id: commit-message
run: |
if [[ "${{ github.ref }}" == 'refs/heads/master' ]]; then
echo "message=${{ github.event.head_commit.message }}" >> "$GITHUB_OUTPUT"
else
echo "message=${{ github.event.pull_request.title }}" >> "$GITHUB_OUTPUT"
fi
macos:
if: "!contains(needs.lint.outputs.message, '!macos')"
needs: lint
uses: ./.github/workflows/macos.yml
with:
mozc_sha: ${{ needs.lint.outputs.MOZC_SHA }}
windows:
if: "!contains(needs.lint.outputs.message, '!windows')"
needs: lint
uses: ./.github/workflows/windows.yml
ios:
if: "!contains(needs.lint.outputs.message, '!ios')"
needs: lint
uses: ./.github/workflows/ios.yml
with:
mozc_sha: ${{ needs.lint.outputs.MOZC_SHA }}
harmony:
if: "!contains(needs.lint.outputs.message, '!harmony')"
needs: lint
uses: ./.github/workflows/harmony.yml
js:
if: "!contains(needs.lint.outputs.message, '!js')"
needs: lint
uses: ./.github/workflows/js.yml
with:
mozc_sha: ${{ needs.lint.outputs.MOZC_SHA }}