forked from godot-rust/gdext
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (92 loc) · 3.34 KB
/
minimal-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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Minimal CI workflow
# Run when someone opens a PR and adds commits to the PR (this is recognized as a push to master)
# Includes basic checks and unit/integration checks on Linux only
name: Minimal CI
on:
pull_request:
branches:
- master
env:
GDEXT_FEATURES: ''
# GDEXT_FEATURES: '--features crate/feature'
# GDEXT_CRATE_ARGS: '-p godot-codegen -p godot-ffi -p godot-core -p godot-macros -p godot'
defaults:
run:
shell: bash
# If a new commit is pushed before the old one's CI has completed (on the same branch), abort previous run
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
rustfmt:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
with:
rust: stable
components: rustfmt
- name: "Check rustfmt"
run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
with:
components: clippy
- name: "Check clippy"
run: |
cargo clippy --all-targets $GDEXT_FEATURES ${{ matrix.rust-extra-args }} -- \
-D clippy::suspicious -D clippy::style -D clippy::complexity -D clippy::perf \
-D clippy::dbg_macro -D clippy::todo -D clippy::unimplemented -D warnings
unit-test:
name: unit-test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Install Rust"
uses: ./.github/composite/rust
- name: "Compile tests"
run: cargo test $GDEXT_FEATURES --no-run
- name: "Test"
run: cargo test $GDEXT_FEATURES
godot-itest:
name: godot-itest
runs-on: ubuntu-20.04
timeout-minutes: 24
steps:
- uses: actions/checkout@v3
- name: "Run Godot integration test"
uses: ./.github/composite/godot-itest
with:
artifact-name: godot-linux-nightly
godot-binary: godot.linuxbsd.editor.dev.x86_64
rust-extra-args: --features godot/custom-godot,godot/custom-godot
godot-prebuilt-patch: '4.1'
license-guard:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: "Check and fix license headers"
uses: apache/skywalking-eyes/[email protected]
with:
# log: debug # optional: set the log level. The default value is `info`.
config: .github/external-config/licenserc.yml
# token: # optional: the token that license eye uses when it needs to comment on the pull request.
# Set to empty ("") to disable commenting on pull request. The default value is ${{ github.token }}
# mode: # optional: Which mode License-Eye should be run in. Choices are `check` or `fix`. The default value is `check`.
mode: check
# - name: "Commit changes"
# uses: EndBug/add-and-commit@v9
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# author_name: 'Godot-Rust Automation'
# author_email: '[email protected]'
# message: 'Auto-apply license headers'